Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;
import android.os.Environment;

public class Main {
    public static String getAbsolutePathOnExternalStorage(final String pFilePath) {
        return Environment.getExternalStorageDirectory() + "/" + pFilePath;
    }

    public static String getAbsolutePathOnExternalStorage(final Context pContext, final String pFilePath) {
        return Environment.getExternalStorageDirectory() + "/Android/data/"
                + pContext.getApplicationInfo().packageName + "/files/" + pFilePath;
    }
}