Android:判断某APP是否安装

import android.content.Context;
import android.content.pm.ApplicationInfo; 
import android.content.pm.PackageManager; 
import android.text.TextUtils;

 public static boolean checkApkExist(Context context, String packageName){ 
	 if (TextUtils.isEmpty(packageName)) 
	 		return false; 
	 try { 
			 ApplicationInfo info = context.getPackageManager() 
			 .getApplicationInfo(packageName, PackageManager.GET_UNINSTALLED_PACKAGES); 

			 return true; 
	 } catch (PackageManager.NameNotFoundException e) { 
			 return false; 
	 } 
 }


没有更多推荐了,返回首页