Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.os.Environment;

import android.text.TextUtils;

import java.io.File;

public class Main {

    public static File getAndroidDataFile(String packageName) {
        String internalsd = Environment.getExternalStorageDirectory().getAbsolutePath(); //getInternalSdcardPath();
        return (TextUtils.isEmpty(internalsd) || TextUtils.isEmpty(packageName)) ? null
                : new File(internalsd, "Android/data/" + packageName);
    }
}