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
1
vote
1 answer

Android 7.0 Doze is it stop all notification?

I am trying to learn Android 7.0 but i see this comment. "When a device is on battery power, and the screen has been off for a certain time, the device enters Doze and applies the first subset of restrictions: It shuts off app network access, and…
DuyguK
  • 4,250
  • 9
  • 33
  • 46
1
vote
4 answers

PhoneStateListener is sometimes not responding in Nougat

I'm registering my PhoneStateListener in onStartCommand of my service. It was working perfectly in below android N devices. But sometimes its not responding in android N devices. Is it related to doze mode? If yes how to tackle it? …
PPB
  • 151
  • 1
  • 14
1
vote
1 answer

Spotify Android SDK with Doze battery optimizations

When I use the Spotify Android SDK to play music and Doze kicks in, the music stops playing because the app loses network connectivity. Is there a way to solve this? The only way I can think of is ask the user to whitelist the app using a…
RuudJ
  • 53
  • 8
1
vote
0 answers

Repeating alarm canceled after a few days

I'm having a problem with a very simple app that shows a notification once a day. To do that I am simply doing this: PendingIntent pendingIntent = [pending Intent to a Service] alarmManager.setInexactRepeating(AlarmManager.RTC,…
BoD
  • 10,838
  • 6
  • 63
  • 59
1
vote
2 answers

Intent Service not working in doze mode

One of my peer developer has written an intent service that makes an API call and then sleeps for 2 mins. After waking up, it sends again. Below is the code: public class GpsTrackingService extends IntentService { .... @Override …
1
vote
0 answers

Android Geofencing and data communication doesn't not working because of battery optimalization

I'm working on a project that uses geofencing. When user enters the geofence area a webservice call occour. After 3 days if the user doesn't start the application the system optimizes it by disable geofencing and/or network communication. I've…
pppg
  • 56
  • 4
1
vote
1 answer

How to fix apps that miss alarms in doze mode?

Some apps, especially those no longer maintained, severely misbehave when an android device with Marshmallow enters doze mode. Apps designed as alarm clock replacements or schedulers to perform certain tasks in the future no longer work reliably,…
Irfy
  • 9,323
  • 1
  • 45
  • 67
1
vote
1 answer

AlarmManager not set or not firing on Marshmallow after certain time

I have been successfully using the following construct to start an AlarmManager in some of my apps upto Android 5: Intent serviceIntent = new Intent(context, MyService.class); PendingIntent pi = PendingIntent.getService(context, alarmId,…
1
vote
1 answer

Android DOZE mode GCM Priority

For DOZE mode test, I am developing a sample GCM App on Android 6.0. As it's said, In DOZE mode the device would not wakeup for normal priority GCM. I wanted to check this. As per the documentation…
0
votes
1 answer

workManager vs alarmManager vs fcm for scheduled notifications

i have a use case: we have information about user's medications like at what time ,what dose and what med, we need to notify users that they have to take it. currently, I have tried workmanager , gets killed if the app gets killed, I tried…
0
votes
0 answers

Network access in Android DOZE Mode

The Android App targeting Android 9 and above is not been able to access the network in Doze mode. Have implemented a background sync service that pulls data from the central server in regular intervals. It all works till the time it enters into…
0
votes
1 answer

setexactandallowwhileidle not trigger notification in idle mode

I have a problem, I'm trying to trigger a notification with alarm manager. But as soon as the device enters idle mode, The notification does not pop up for me, it only appears after entering the application this is my code in activity: val intent =…
0
votes
0 answers

Firebase cloud messaging not working in doze mode even with high priority

I am doing a e-hailing project. User will be placing order and driver will be receiving a notification when user placed an order. For iOS, everything work fine. Notification can be received by driver without any issue when there is a new order for…
0
votes
1 answer

Changing Doze mode parameters programmatically

Question about changing the parameters of the transition to doze mode I have a non-rooted Android 12 device There are a number of parameters for changing the transition time in doze mode: inactive_to motion_inactive_to light_after_inactive_to If…
0
votes
1 answer

Repeating alarm manager that fires in doze mode

My app utilizes a alarm manager function the when fired runs a broadcaster, it is set to repeat daily at 7am using calendar. Here is my current code: val mIntent = Intent(this, MyReceiver::class.java) val calendar: Calendar =…
Joshu
  • 39
  • 7