我想从我的应用程序中启动所有已安装的应用程序。在这里我获取所有已安装的应用程序
List<ApplicationInfo> applicationInfoList = packageManager.getInstalledApplications(PackageManager.GET_ACTIVITIES | PackageManager.GET_META_DATA);
if(applicationInfoList != null && !applicationInfoList.isEmpty()){
Collections.sort(applicationInfoList, new ApplicationInfo.DisplayNameComparator(
packageManager));
for (ApplicationInfo applicationInfo : applicationInfoList) {
Intent intent = packageManager.getLaunchIntentForPackage(applicationInfo.packageName);
if(intent != null){
ComponentName componentName = intent.getComponent();
//add componenet to a list
}
}
}
但我无法启动一些应用程序,如联系人和电话。这些应用程序的类名称是“ResolverActivity”。我如何从我的应用程序启动这些应用程序?
提前致谢