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;
import java.io.File;

public class Main {
    public static String getDataDirectory(Context context) {
        File sdRoot = Environment.getExternalStorageDirectory();
        String path = sdRoot.getPath();
        String packageName = context.getPackageName();
        path = path + File.separator + "Android" + File.separator + "data" + File.separator + packageName
                + File.separator + "files" + File.separator;
        return path;
    }
}