int appUid = -1;
try {
PackageManager packageManager = getPackageManager();
ApplicationInfo ai = packageManager.getApplicationInfo("包名", PackageManager.GET_SERVICES);
appUid = ai.uid;
} catch (Exception e) {
e.printStackTrace();
}
final Intent intent = new Intent("android.settings.APP_NOTIFICATION_SETTINGS");
intent.putExtra("app_package", "包名"); intent.putExtra("app_uid", appUid);
startActivityForResult(intent, 0);
}
直接进入app通知设置界面
最新推荐文章于 2021-06-25 11:57:09 发布