android - 华为 protected 应用程序的 Intent

标签 android android-intent huawei-mobile-services

我们知道华为和小米在设置选项中有“protected apps option”,这个选项会在屏幕关闭时杀死我们的应用程序,然后无法收到通知和其他...我想警告我的用户关于此选项并打开此设置部分,是否可以在此设置目录中打开一个 itent?实际上我打开设置的目的是:

startActivity(new Intent(Settings.ACTION_SETTINGS));

有什么想法吗?提前致谢!

最佳答案

Intent intent = new Intent();
intent.setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.optimize.process.ProtectActivity"));
startActivity(intent);

关于android - 华为 protected 应用程序的 Intent ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40970869/

相关文章:

android - 保存 ListView 项目

android - 获取以前的 Activity ?

android - 在android Activity 之间发送多个数据的问题

android - 华为使用 ML Kit 进行人脸检测在某些设备上无法工作

在我的华为手机上调试时,Android Studio 调试器在断点处崩溃/停止

android - SharedPreferences.getInt ("cumulative", 0) catch 22 - 如何解决?

android - Android连接WIFI后如何通过移动网络保持连接?

android - context.getSystemService(UserManager.class) 在 Android 9 华为手机上返回 null

android - Branch.io validateReferralCode() 和 applyReferralCode() 之间的区别?

安卓拦截 Intent