List of usage examples for android.content.pm PackageManager GET_ACTIVITIES
int GET_ACTIVITIES
To view the source code for android.content.pm PackageManager GET_ACTIVITIES.
Click Source Link
From source file:Main.java
public static boolean isPackageOk(Context context, String path) { return context.getPackageManager().getPackageArchiveInfo(path, PackageManager.GET_ACTIVITIES) != null; }
From source file:Main.java
public static boolean isInstalled(Context context, String packageName) { try {/*from w w w .ja v a2 s . c o m*/ context.getPackageManager().getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } }
From source file:Main.java
public static PackageInfo getUninatllAppInfo(PackageManager pm, String archiveFilePath) { PackageInfo info = pm.getPackageArchiveInfo(archiveFilePath, PackageManager.GET_ACTIVITIES); return info;// w ww . j a va2s. c om }
From source file:Main.java
public static boolean isPackageInstalled(Context context, String packagename) { try {/*from ww w . jav a2s .c om*/ context.getPackageManager().getPackageInfo(packagename, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } }
From source file:Main.java
public static boolean appInstalledOrNot(Context context, String packageName) { try {// w ww. j av a2 s .c om context.getPackageManager().getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } }
From source file:Main.java
public static boolean apkInstalled(Context context, String uri) { PackageManager pm = context.getPackageManager(); try {/* w w w . j a v a 2 s . co m*/ pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } }
From source file:Main.java
public static boolean isInstalled(Context context, String packageName) { PackageManager pm = context.getPackageManager(); try {/*from w w w . jav a 2 s . c o m*/ pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } }
From source file:Main.java
public static boolean isPackageInstalled(String packageName, Context context) { PackageManager pm = context.getPackageManager(); try {/*w ww . ja v a2s . com*/ pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } }
From source file:Main.java
public static boolean isPackageExist(Context context, String packageName) { try {/*from w w w. j a v a2 s . co m*/ context.getPackageManager().getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); return true; } catch (Exception e) { return false; } }
From source file:Main.java
public static boolean isPackageInstalled(Context context, String packageName) { final PackageManager pm = context.getPackageManager(); try {//from w w w . ja va 2 s . c om pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); return true; } catch (PackageManager.NameNotFoundException e) { return false; } }