单击OnListItemClick()goto卸载通过Intent

时间:2014-11-28 07:39:44

标签: android

有一个列表视图,显示在手机中安装的所有应用程序...现在函数OnListItemClick(){

} 点击app goto卸载通过Intent

1 个答案:

答案 0 :(得分:0)

试试这个:

Intent i = new Intent();
i.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
i.addCategory(Intent.CATEGORY_DEFAULT);
i.setData(Uri.parse("package:" + packageName));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//This might fail if the app is not found, so better use it in a try catch block
context.startActivity(i);