权限 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"
)
)
)
但是这段代码导致我的应用程序无法加载。它会犯这样的错误:
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_SAFE
AndroidManifest
代码:科特林
错误:需要 oppo.permission.OPPO_COMPONENT_SAFE