权限oppo的代码无法加载应用程序。Oppo手机不能在后台处理通知,但当我使用这些代码时,它工作得很好:
val POWERMANAGER_INTENTS = arrayOf(
Intent().setComponent(
ComponentName(
"com.coloros.safecenter",
"com.coloros.safecenter.permission.startup.StartupAppListActivity"
)
),
Intent().setComponent(
ComponentName(
"com.coloros.safecenter",
"com.coloros.safecenter.startupapp.StartupAppListActivity"
)
)
)但是这段代码导致我的应用程序无法加载。它就是像这样make错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.firebasesms.hong/com.firebasesms.hong.MainActivity}: java.lang.SecurityException: Permission Denial: starting Intent.......
Caused by: java.lang.SecurityException: Permission Denial: starting Intent ..... requires oppo.permission.OPPO_COMPONENT_SAFEAndroidManifest

代码: Kotlin

错误:需要oppo.permission.OPPO_COMPONENT_SAFE

发布于 2019-05-28 14:42:26
您需要在您的清单中添加"OPPO_COMPONENT_SAFE“权限才能启动意图。
<!--for OPPO-->
<uses-permission android:name="oppo.permission.OPPO_COMPONENT_SAFE" />https://stackoverflow.com/questions/56336221
复制相似问题