Questions tagged [android-doze]

Doze mode introduced with Android 6.0 Marshmallow as a power-saving feature.

The Doze mode was introduced with Android 6.0 Marshmallow to improve the power usage of the device. If the device is not charging and had no user interaction for some time, the usage of CPU and network gets restricted by deferring background tasks and executing them in batches during maintenance windows.

191 questions
2
votes
0 answers

Correct way to ask to disable battery optimizations

I'm currently developing an app that transfers files via wi-fi under the same network. The transfer jobs are done by WorkManager and all operations are marked as high priority (they are converted to foreground services, if possible and priority…
MichiBros
  • 113
  • 1
  • 7
2
votes
1 answer

Android app not waking up from doze mode even with High priority Message

I'm trying to wake up my from doze mode using a Firebase High Priority Message. However, despite the high priority push being sent, my app is not reacting to this message and remains in doze mode. This has a direct and critical impact in the…
2
votes
1 answer

Ignore battery optimization permission for our android app is getting denied on Xiaomi android 11 devices

In our android app we ask for ignore battery optimization permission, and the user has an option to allow or deny the permission On some Xiaomi android 11 devices , even when the user clicks allow permission , it brings back an error that the…
sushmitha
  • 21
  • 2
2
votes
1 answer

Android - Disable Forced DozeMode or AppStandByMode

I have an application that uses a ForegroundService to send location updates to a server. Basically a tracker. This ForegroundService has a Handler that periodically (using postDelayed) executes a block of code to send the location. This works…
2
votes
1 answer

Android Kotlin : Getting location when app is in doze mode

I'm trying to get the current location of the user of the app every 2 seconds. I already use a foreground service with notification (can record location when app is in background). But when the app enters doze mode it will continue to give 3…
2
votes
1 answer

Scanning for Bluetooth LE devices when the phone is in doze mode, don't work. CallBack method dosn't called when doze mode

I am developing an Android app (the app runs on Android 6): I want the app to send a notification to the user when it is near a BLE device (a device that I have at home). So I continuously scan, I scan through a service (which is running in the…
2
votes
2 answers

MediaPlayer (or Ringtone) doesn't start playing when the screen is off (phone is locked)

I'm creating a Reminder application (it's like an alarm clock) you can set tasks in it. The code for receiving the previously set alarm intent (with setExactAndAllowWhileIdle): @Override public void onReceive(Context context, Intent intent) { …
2
votes
0 answers

alarm for RTC_WAKEUP, and BroadcastReceiver to intercept doze mode

I want my react-native headless JS running in the background to perform a job every 30 seconds. When there is a criteria match I want a notification alert on my Android phone. Everything works perfectly before the phone gets dozed. The alarm job…
lannyboy
  • 843
  • 1
  • 12
  • 22
2
votes
1 answer

Android is Killing my Application when it's in background

I Have an application made in React Native, which uses localization in background to take some decisions. What happens is that Doze is killing it everytime user puts it at his pocket. Can't tell the user to switch something on or off What should I…
Guilherme Ferreira
  • 2,209
  • 21
  • 23
2
votes
1 answer

Android Alarm - Activity Sometimes Remains Black After Keyguard Dismissal

I have an alarm activity, that launches from a service as a Full-Screen Notification Intent. The problem is that sometimes, the activity will remains black until I turn it off and on again. Now, although the screen is black, the views respond to the…
2
votes
1 answer

Purpose of WakeLock in modern Android?

I'm having a hard time understanding the purpose of WakeLock in modern versions of Android, after the introduction of Doze and Foreground Services. It appears as if WakeLocks are pretty much legacy as this point (although not marked as deprecated),…
2
votes
1 answer

Activity Remains BLACK when launching under Doze Mode

So I have an alarm activity, that launches from a service, and while in doze mode, the activity remains black until I turn it off and on again. Now, although the screen is black, the views are responsive (If I touch them, they work) If I try to take…
2
votes
2 answers

How to keep GPS receiver location updates when the app is in background ( Google Play Service Location API)

Sorry this is a long question, but I'm hoping that one of you experts out there can help a novice who is going quietly mad!! I have an Android app which uses a background service to get GPS fixes (using Google Play Services) every 20 seconds. It…
Chris S
  • 83
  • 3
  • 12
2
votes
0 answers

Does AlarmManager wake the device up from Doze mode

Does setAndAllowWhileIdle() or setExactAndAllowWhileIdle() actually wake up the device from Doze mode? And does it remove the restriction on Network Access?
Tsunaze
  • 3,204
  • 7
  • 44
  • 81
2
votes
1 answer

BroadcastReceiver has no internet access

I'm facing a problem with my broadcast receiver. I have set an alarm for 6am, it has to fire my broadcast receiver, which only has to download some data from internet and process it. If I set the alarm for 3pm, for example, it works fine. But the…