I used to use implicit broadcast (Inside manifest) to listen to install and uninstall, and works good until Android 6.0 where we must use explicit broadcast, and for that I removed the implicit broadcast and used a service that listen to the events, and worked good for Android 7.1 and lower, to find out that it's not working on Android 8.0+
Why the listening service is not working on Android 8.0+?
JobScheduler is not efficient, imagine this scenario, a user started to install an app from Google Play Store and switched back to my application, user would expect the new app to appear in my app, not to close my app and open it again to re-fetch the installed apps list.
I followed CommonsWare advice and used target sdk version 25, but as you know Google Play is no more accepting new apps or updates that its target is less than 26
Receiving package install and uninstall events
https://commonsware.com/blog/2017/04/11/android-o-implicit-broadcast-ban.html
My question is, what can I do?
I need an efficient solution that supports all android versions and obey Google Play rule (I must target API 26+).