Android开发片段–获取已安装的软件的信息并启动

 for (PackageInfo pack : getPackageManager().getInstalledPackages(0)) {   
			 ApplicationInfo info = pack.applicationInfo;
			 String pkgName = info.packageName;
			 Log.d("Example", "packageName: " + pkgName); 
             Log.d("Example", "manageSpaceActivityName:" +  getPackageManager().getLaunchIntentForPackage(pkgName)); 
			 //启动
             //Intent in = getPackageManager().getLaunchIntentForPackage(pkgName);
             //startActivity(in);
		 }
		
 

你可能感兴趣的:(Android开发)