android-doze

How to shift device in Doze Mode (Android Preview M / Marshmallow)?

穿精又带淫゛_ 提交于 2019-11-28 16:02:25
问题 I followed steps described here: https://developer.android.com/preview/testing/guide.html#doze-standby Circumstances: Android Debug Bridge version 1.0.32 Nexus 9 with Preview M Shell: $ adb shell dumpsys battery unplug => worked, device unplugged $ adb shell dumpsys deviceidle step => Output: Stepped to: ACTIVE $ adb shell dumpsys deviceidle -h => does not work => Output: Device idle controller (deviceidle) dump options: [-h] [CMD] -h: print this help text. Commands: step disable enable

How do I properly fire ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS intent?

纵饮孤独 提交于 2019-11-28 04:42:07
As stated in the documentation: "An app holding the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission can trigger a system dialog to let the user add the app to the whitelist directly, without going to settings. The app fires a ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS Intent to trigger the dialog." Can someone tell me the proper way to fire this intent? Buddy Intent intent = new Intent(); String packageName = context.getPackageName(); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); if (pm.isIgnoringBatteryOptimizations(packageName)) intent.setAction(Settings

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

How do I properly fire ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS intent?

只谈情不闲聊 提交于 2019-11-26 19:24:05
问题 As stated in the documentation: "An app holding the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission can trigger a system dialog to let the user add the app to the whitelist directly, without going to settings. The app fires a ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS Intent to trigger the dialog." Can someone tell me the proper way to fire this intent? 回答1: Intent intent = new Intent(); String packageName = context.getPackageName(); PowerManager pm = (PowerManager) context.getSystemService

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