I want to know how to let my android service is always running when screen off?
of course , I set WakeLock , but it's seems not working when screen off ....
and at the same time , my app is in background(home pressed)
I try to use notificationManager, yes, it's working even screen off,
but if I want to send data(json) to my web server , it's not working,
does any suggestion? By the way , android sdk is 30, Thanks.
Whenever an app runs in the background, it consumes some of the device's limited resources, like RAM. This can result in an impaired user experience, especially if the user is using a resource-intensive app, such as playing a game or watching video. To improve the user experience, Android 8.0 (API level 26) imposes limitations on what apps can do while running in the background. This document describes the changes to the operating system, and how you can update your app to work well under the new limitations. https://developer.android.com/about/versions/oreo/background