Android Oreo constant notification "The application is running in the background"

I am an Android app developer and am developing an instant messaging app. The application has a notification problem in the Android Oreo system, which shows a constant notification "The application is running in the background" and cannot be cleared, and it works in the system before Android Oreo.

Screenshot: A continuous notification is displayed on the phone. The application runs in the background

I find a discussion, for example the Nexus help forum about this question , but it does not work in my phone settings.

I want to know how to hide this notification programmatically, and the application can also receive a message instantly, because it is an instant message application.

Any help is greatly appreciated.

+4
source share
2 answers

Before talking about how to get rid of him, let's talk about why he is there in the first place.

Basically, in previous versions of Android there was no real way to find out if an application is running in the background, a bunch of things that it shouldn't do. In most scenarios, these abnormal applications will damage the battery, supporting waking up the system - they are called "wakelocks". In sluts, this kept the system awake. This is bad.

Oreo Google , . , , .

. , , , VPN. , , .

, . . , , . .

, . , , Oreo . .

, , , iboalali , . "Hide", ", , . .

root Android- " " Android 8.0 Oreo. ForegroundServiceController, ForegroundServiceDialog, , . .

,

+2

Android Oreo, " " , Android Oreo.

startForeground() Notification.

,

startForeground() Notification, , . , startForeground().

, WeChat, Facebook Android Oreo

, . , Firebase Cloud Messaging (FCM).

-1

Source: https://habr.com/ru/post/1686091/


All Articles