I am successfully able to monitor new app installation by dynamically registering broadcast in foreground service for Oreo and above version. But for this I always have to show a persistent notification of my app. Is there any alternative to
Google in documentation says:
You should only use a foreground service when your app needs to perform a task that is noticeable by the user even when they're not directly interacting with the app. For this reason, foreground services must show a status bar notification with a priority of PRIORITY_LOW or higher, which helps ensure that the user is aware of what your app is doing. If the action is of low enough importance that you want to use a minimum-priority notification, you probably shouldn't be using a service; instead, consider using a scheduled job.
So can I use foreground service for this purpose. If not than what is its alternative.