Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Start Permission not working on oneplus device #87

Open
shaikhsiddik opened this issue Apr 7, 2023 · 3 comments
Open

Auto Start Permission not working on oneplus device #87

shaikhsiddik opened this issue Apr 7, 2023 · 3 comments

Comments

@shaikhsiddik
Copy link

Hello every one, i need small favour so i'm trying to add permission for auto start but auto start screen not opening. if any one achieve the result on oneplus please help me. thanks in advance

@RandomEngy
Copy link

It's currently searching for the package com.oneplus.security which does not appear on my OnePlus 8 device.

I believe the auto-launch is configured with the package com.oplus.battery and activity com.oplus.startupapp.view.StartupAppListActivity.

However when I try to launch that Intent I get:

java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.oplus.battery/com.oplus.startupapp.view.StartupAppListActivity mCallingUid=10501 } from ProcessRecord{9d50baa 26557:net.focalist/u0a501} (pid=26557, uid=10501) requires oplus.permission.OPLUS_COMPONENT_SAFE

I tried adding <uses-permission android:name="oplus.permission.OPLUS_COMPONENT_SAFE"/> to the manifest but that didn't work.

@rayworks
Copy link
Contributor

rayworks commented Oct 12, 2024

Hi @RandomEngy, I've come across the same issue on a oneplus device when dealing with the push notification.
I think now days the device manufactures take more aggressive strategies against the permission request from apps.

However, there is another way to do it instead of requesting to change the startup option. According to the Android developer doc, we could ask for disabling the battery optimization by requesting REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission, but Google seems reluctant to allow apps to use this action. See also here and here.

@RandomEngy
Copy link

I've given up and taken an alternate path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants