|
|
|
|
|
by mflare
2496 days ago
|
|
Yes, this Doze whitelist has existed since Marshmallow, when Doze was introduced. However, adding your app to this list does not affect the limitations of background services implemented with Oreo. If you want to implement your own push notifications, you need some kind of persistent connection to your server. Before Oreo, this was simply possible with a background service. But starting from Oreo, your background services are shut down after 2 or 3 minutes, as soon as the corresponding app is no longer in the foreground.
Of course, you could try to use a foreground service (which must display a notification). But even then the user gets a constant warning displayed like "App xyz is running in the background" or "App xyz is using battery". Many users are not developers. If they get such a warning, they think something is wrong with your app. This is just not a good user experience.
You are virtually forced to use FCM. And that doesn't work without a Google account. |
|
"App xyz is running in the background" or "App xyz is using battery" aren't normally shown when you foreground Notification is properly constructed. If you correctly set icon, text, notification channel and other properties, the notification bar should have only your notification and nothing else. At least it have always worked that way on devices I own.