judemanutd / AutoStarter

This library helps bring up the autostart permission manager of a phone to the user so they can add an app to autostart.
MIT License
626 stars 115 forks source link

Support for Realme devices #64

Open arnab-kundu opened 3 years ago

arnab-kundu commented 3 years ago

This is repo is very helpfull and working as per the README mentioned devices. But I am looking for the same in realme device.

arnab-kundu commented 3 years ago

FYI. realme is using coloros. I was doing some RND the package name I found is com.coloros.safecenter

judemanutd commented 3 years ago

That's great @arnab-kundu . Unfortunately since I don't have access to these phones, I cannot really test this out but I would be glad to review a PR that integrated this phone into the library.

arnab-kundu commented 3 years ago

@judemanutd could me tell me how do you find this AutoStartActivity's fully qualified package name for these devices. Please let me know if any tool you have used for this. I have tried with android studio's logcat and Appuim tool but no luck yet.
PACKAGE_XIAOMI_COMPONENT = "com.miui.permcenter.autostart.AutoStartManagementActivity" or PACKAGE_HONOR_COMPONENT = "com.huawei.systemmanager.optimize.process.ProtectActivity"

judemanutd commented 3 years ago

Hey @arnab-kundu unfortunately there is no tool, atleast none that I have found. The way I found it for Xiaomi was pure luck. You need to switch the logcat to watch for all logs, and then watch the logs for any activity events that occurs while opening the autostart screen on your phone. The package could be a parent package so it might pop up a few screens before the autostart screen as well. Once you have a list of package names on hand, from there is a matter of trying every package name with every other package name which is exactly what the library does as well once you look at the source code.

krunalpatel3 commented 1 year ago

i m also facing same issue i can not find auto start intent filter for realme devices

krunalpatel3 commented 1 year ago

https://stackoverflow.com/questions/77314189/ask-auto-start-permission-in-realme-devices