android-6.0-marshmallow

How to differentiate between the device entering a Doze maintenance window and coming out of Doze

我怕爱的太早我们不能终老 提交于 2021-01-27 06:36:15
问题 I have a method which periodically runs to keep a network connection alive. During Doze mode, I would like to disable it from running periodically and run exactly once during a maintenance window. When the device comes out of Doze, I would like the method to be called periodically again. How can I accomplish this ? I have registered a receiver that listens for the PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED broadcast and then calls PowerManager.isDeviceIdleMode() . However, this return false

How to differentiate between the device entering a Doze maintenance window and coming out of Doze

情到浓时终转凉″ 提交于 2021-01-27 06:35:32
问题 I have a method which periodically runs to keep a network connection alive. During Doze mode, I would like to disable it from running periodically and run exactly once during a maintenance window. When the device comes out of Doze, I would like the method to be called periodically again. How can I accomplish this ? I have registered a receiver that listens for the PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED broadcast and then calls PowerManager.isDeviceIdleMode() . However, this return false

How to differentiate between the device entering a Doze maintenance window and coming out of Doze

一世执手 提交于 2021-01-27 06:35:17
问题 I have a method which periodically runs to keep a network connection alive. During Doze mode, I would like to disable it from running periodically and run exactly once during a maintenance window. When the device comes out of Doze, I would like the method to be called periodically again. How can I accomplish this ? I have registered a receiver that listens for the PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED broadcast and then calls PowerManager.isDeviceIdleMode() . However, this return false

Android: Get localized permission group names

。_饼干妹妹 提交于 2020-08-07 05:12:32
问题 In marshmallow's runtime permission, user can choose "never ask again" in permission requests. In this case, we have to redirect user to app settings to let them enable the permissions for the app. Also, Android permissions are group based, it will be very handy to display names of the permission groups that the app needs before we send the user to the settings. I've seen the strings in android.Manifest such as " android.permission-group.LOCATION ". Is it possible to get the permission group

Android: Get localized permission group names

喜欢而已 提交于 2020-08-07 05:08:33
问题 In marshmallow's runtime permission, user can choose "never ask again" in permission requests. In this case, we have to redirect user to app settings to let them enable the permissions for the app. Also, Android permissions are group based, it will be very handy to display names of the permission groups that the app needs before we send the user to the settings. I've seen the strings in android.Manifest such as " android.permission-group.LOCATION ". Is it possible to get the permission group

Cancel Fingerprint scanner

徘徊边缘 提交于 2020-05-27 04:32:25
问题 I am working on a program that has a security function including a PIN and a fingerprint, but now I'm having a problem with entering the password (PIN or Fingerprint). Incorporating the correct fingerprints is fine, but when I enter the PIN code, after I exit the PIN and fingerprint activity, the machine continues to listen for fingerprints, I know this because when I click on the "home" button "The machine still vibrates slightly, so there is no way to stop listening to fingerprints? 回答1: