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
0 answers

Android Wake lock remains after Doze mode?

Iam trying to simulate the Doze mode while my app is running in the background. What happens is that the thread will continue to run, even though the device has entered Doze mode. The docs specifies that wake locks are ignored, so why cpu is still…
1
vote
1 answer

Doze mode on Oreo

I am facing issue in my app regarding doze mode. I am making a chat application and when app is in backgroud during doze mode and receive any message . Device does not show notification in orea. I have followed the proper procedure for OREO…
1
vote
1 answer

Avoid doze mode programmatically

I'm developing an Android app that uses Xiaomi Mi Band 1S to keep measurements of heart rate all the time. I use a service to handle Bluetooth connection and I already achieved to keep this service alive when the app is close, and even to restart…
1
vote
0 answers

Doze mode Vs MQTT Connectionlost

When Android device enters in to Doze mode,connectionlost Callback is triggered in MQTT What I have tried till now? 1.Written broadcast receiver to detect app is entering in to Doze mode or not. 2.Once It enters,Doing Partial WAKE LOCK. My Questions…
kavie
  • 2,154
  • 4
  • 28
  • 53
1
vote
0 answers

How can I override doze mode while the device is moving?

I am coding an app that needs to poll location at specific intervals even when the app is off. I am currently using a Firebase JobDispatcher to get the job done. The code is as follows: BackgroundJob.schedule({ jobKey: backgroundJobKey, …
Thanatos
  • 282
  • 5
  • 18
1
vote
0 answers

Android, How to detect and to do a task in mode idle_maintenance?

I need to send tracking info when device is in DOZE mode. According to page monitoring-device-state there are idle and idle_maintenance, I understand that when it is in idle_maintenance window, the applications can execute tasks. In my case I want…
1
vote
1 answer

CPU Usage of Foreground Service with Handlers

How can I get sure that a foreground service can use CPU when app is closed, when screen is locked and when doze mode is active? There are handlerthreads in which I plan tasks with postdelayed method within the foreground service. I list my test…
Mertcan Çüçen
  • 466
  • 3
  • 13
1
vote
1 answer

App freezes for a second on REQUEST_IGNORE_BATTERY_OPTIMIZATIONS

I'm working on an app that requires active working service so to avoid Doze Mode I've write code that'll show a default dialog to ask that this app will consume more battery and all. But the main problem here is before showing that dialog app…
Ashutosh Sagar
  • 981
  • 8
  • 20
1
vote
0 answers

When turn on doze mode on an emulator it doesn't work

When I turn on doze mode on an android emulator using adb shell it just freeze. I cannot reboot it and emulator restarting doesn't help. I use the following commands for turn doze mode on: adb shell dumpsys battery unplug adb shell dumpsys…
Alex.Marynovskyi
  • 1,264
  • 3
  • 16
  • 22
1
vote
1 answer

Android Alarm Not Set

I used to set alarms using the following code-segment in other projects as repeating and non-repeating, but it's now driving me crazy about what may the silly mistake be that I've made for not the alarm speaking to my current implementation :\…
Touhid
  • 731
  • 1
  • 10
  • 25
1
vote
2 answers

Android app appears in Battery Optimizations whitelist, but is not actually there

Background: I am developing an Android app. When the app starts up, it checks to see if it is excluded from Battery Optimizations using the isIgnoringBatteryOptimizations() function. If that function returns false, I use the…
paperduck
  • 1,175
  • 1
  • 16
  • 26
1
vote
0 answers

Android Nougat device not sending locations to the server in doze off mode

I am designing an app in which I need to send locations periodically to the server. But due to the doze off feature, the device stops sending locations after sometime. Is there a workaround that can be done to solve this issue. Thanks in advance.
Kanika
  • 714
  • 8
  • 24
1
vote
1 answer

Services stopping automatically from android OS 5.1.1

I am working on an application related to Voip & IM (chatting application). Till android OS 5.0 it is working good and no issues from client also. But from android OS 5.1.1 onwards we are facing issues. Issues: If the app is in foreground and if…
1
vote
3 answers

Doze mode sleeps Google's Geofence sample application

I have an android application that uses Geofence and I'm having a hard time overcoming Doze mode. My manifest has the WAKE_LOCK permission and seven setNotificationResponsiveness to 0 for each region. I even changed PendingIntent to…
user6505882
  • 247
  • 3
  • 16
1
vote
0 answers

setAlarmClock is not exact

This is my first question on stackoverflow. I have read many similar topics but have been unable to find the problem and I am getting a bit desperate. I develop an app with an alarm clock. This alarm clock only rings under certain circumstances. If…
Lo-Cool
  • 11
  • 2