Search code examples
javaandroidkotlinscreen-lock

How Cm Locker works immediately after boot


I'm making an Android Studio project but I'm too bad to make it good and practical I have to make my own screen lock app and the biggest issue in this type of app that it needs to work immediately after boot completed

I've searched a lot about this but didn't find anyway to make it like Cm Locker which works exactly like the system screen lock.

the BroadCastReceiver takes too long to read ACTION_BOOT_COMPLETED even with maximum priority so I'm quite sure they didn't make it this way and it looks a really hard thing to do


Solution

  • it was simpler than I thought we just need to add Home to manifest

                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>