android-doze-and-standby

How to set the repeating alarm which will work even in Doze mode?

眉间皱痕 提交于 2019-12-10 13:56:17
问题 I understood that setExactAndAllowWhileIdle will invoke alarm even in Doze mode but how to make it repeat every day because there is no setRepeatingAndAllowWhileIdle kind of method. 来源: https://stackoverflow.com/questions/34709335/how-to-set-the-repeating-alarm-which-will-work-even-in-doze-mode

Android Wake lock remains after Doze mode?

倖福魔咒の 提交于 2019-12-08 07:19:00
问题 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 on? Tested On: Emulator with Api 27 JobScheduler jobScheduler = (JobScheduler)getApplicationContext() .getSystemService(JOB_SCHEDULER_SERVICE); ComponentName componentName = new ComponentName(this, MyJob.class); JobInfo jobInfo = new JobInfo.Builder

Unplugging the device via ADB: “can't find service”

岁酱吖の 提交于 2019-12-06 09:17:47
问题 I have to test how my app behaves in doze mode. According to the documentation, I first must make the device think it's unplugged by entering the following command in the terminal: $ adb shell dumpsys battery unplug However, nothing happens and it logs: Can't find service: battery What should I do? 回答1: There is no battery service as the log points out (this may be device specific). Enter the following command to find existing battery related services: $ adb shell service list | grep battery

Unplugging the device via ADB: “can't find service”

早过忘川 提交于 2019-12-04 16:43:22
I have to test how my app behaves in doze mode. According to the documentation , I first must make the device think it's unplugged by entering the following command in the terminal: $ adb shell dumpsys battery unplug However, nothing happens and it logs: Can't find service: battery What should I do? There is no battery service as the log points out (this may be device specific). Enter the following command to find existing battery related services: $ adb shell service list | grep battery it will result in something like this $ adb shell service list | grep battery 88 batterymanager: [android

Android AlarmManager.setExactAndAllowWhileIdle() and WakefulBroadcastReceiver Not working in some new manufactured and low price devices

烈酒焚心 提交于 2019-11-29 21:00:32
I think this question is asked many time in stackoverflow but still so many people struggling to resolved it. In my android app I have to wake up device for every half hour to getting current location and send it to server. For this I have used AlarmManager with setExactAndAllowWhileIdle() method and WakefulBroadcastReceiver . Its working fine in almost all standard/popular devices like samsung, LG(Nexus), Sony, Panasonic, lenovo, Motorola, Micro max and so on....But some other devices mostly china devices not supporting or cannot allow device wake up from doze mode with

Android AlarmManager.setExactAndAllowWhileIdle() and WakefulBroadcastReceiver Not working in some new manufactured and low price devices

早过忘川 提交于 2019-11-28 17:12:02
问题 I think this question is asked many time in stackoverflow but still so many people struggling to resolved it. In my android app I have to wake up device for every half hour to getting current location and send it to server. For this I have used AlarmManager with setExactAndAllowWhileIdle() method and WakefulBroadcastReceiver . Its working fine in almost all standard/popular devices like samsung, LG(Nexus), Sony, Panasonic, lenovo, Motorola, Micro max and so on....But some other devices mostly

Alarm Manager issue in Android 6.0 Doze mode

南楼画角 提交于 2019-11-28 09:21:38
I've made an app that always worked until Android 6.0. I think it's the Doze feature that it's not allowing my Alarm to fire. I use sharedpreferences to handle the options: //ENABLE NIGHT MODE TIMER int sHour = blockerTimerPreferences.getInt("sHour", 00); int sMinute = blockerTimerPreferences.getInt("sMinute", 00); Calendar sTime = Calendar.getInstance(); sTime.set(Calendar.HOUR_OF_DAY, sHour); sTime.set(Calendar.MINUTE, sMinute); Intent enableTimer = new Intent(context, CallReceiver.class); enableTimer.putExtra("activate", true); PendingIntent startingTimer = PendingIntent.getBroadcast

How does doze mode affect background/foreground services, with/without partial/full wakelocks?

妖精的绣舞 提交于 2019-11-27 04:24:26
This is a simple question, seeing that there is a huge post about this on G+ ( here ), and lack of information on official docs ( here ): What happens to the app's services when the device goes to "doze" mode? What does it do to background/foreground services (bound/unbound, started/not-started), with/without partial/full wakelocks? What would you do, for example, in order to create a service that plays an audio stream while the device's screen is turned off? What if the audio stream is not from a local file, but from the network? Seeing that there was a claim by Google developer: Apps that

Alarm Manager issue in Android 6.0 Doze mode

♀尐吖头ヾ 提交于 2019-11-27 02:57:46
问题 I've made an app that always worked until Android 6.0. I think it's the Doze feature that it's not allowing my Alarm to fire. I use sharedpreferences to handle the options: //ENABLE NIGHT MODE TIMER int sHour = blockerTimerPreferences.getInt("sHour", 00); int sMinute = blockerTimerPreferences.getInt("sMinute", 00); Calendar sTime = Calendar.getInstance(); sTime.set(Calendar.HOUR_OF_DAY, sHour); sTime.set(Calendar.MINUTE, sMinute); Intent enableTimer = new Intent(context, CallReceiver.class);

How does doze mode affect background/foreground services, with/without partial/full wakelocks?

删除回忆录丶 提交于 2019-11-26 12:44:20
问题 This is a simple question, seeing that there is a huge post about this on G+ (here), and lack of information on official docs (here ): What happens to the app\'s services when the device goes to \"doze\" mode? What does it do to background/foreground services (bound/unbound, started/not-started), with/without partial/full wakelocks? What would you do, for example, in order to create a service that plays an audio stream while the device\'s screen is turned off? What if the audio stream is not