Android examples for android.content.pm:Apk Install
is Install APK On SD Card
import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class Main { public static boolean isInstallOnSDCard(Context context, String packageName) { try {//from ww w .jav a2s .c om PackageManager pm = context.getPackageManager(); ApplicationInfo appInfo = pm.getApplicationInfo(packageName, 0); if ((appInfo.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0) { return true; } } catch (NameNotFoundException e) { e.printStackTrace(); } return false; } public static ApplicationInfo getApplicationInfo(Context context) { return context.getApplicationInfo(); } }