I really didn’t have to do much for marshmallow. I did notice that I was using the WRITE_EXTERNAL_STORAGE permission unecessarily so I removed it. Then, I up-leved my gradle files and ran the app on marshmallow.
Since I don’t have any permissions, I don’t have to worry about the on-demand permission issues. You have no idea how happy I am about that because it can be a real PIA to retrofit an app for them. I did create an example project to demonstrate how to deal with permissions, but that is a different post.
That leave only Doze mode and the Auto Backup to deal with. Neither is a big deal. I tested the Auto Backup with the instructions found here. Testing Doze Mode was a little tougher because the instructions didn’t really work. I included my steps below.
In either case, my app tested without any glitches so I am claiming victory for Marshmallow.
Detour: Testing Doze Mode
The documentation for testing doze mode is a little sparse, but here is the procedure I used to test it.
Enabling Doze Mode:
- Start an “M” emulator
- Install your app on the device
- Start a terminal
- adb shell dumpys deviceidle enable
- adb shell dumpsys battery unplug
- (emulator screen turns off)
- adb shell dumpsys deviceidle step
- output is IDLE_PENDING
- adb shell dumpsys deviceidle step
- output is SENSING
- adb shell dumpsys deviceidle step
- output is IDLE
- adb shell dumpsys deviceidle step
- output is IDLE_MAINTENANCE
Disabling Dose Mode:
- In a terminal:
- adb shell dumpys deviceidle disable
- adb shell dumpsys battery ac
- Go to the emulator and press escape
- The screen turns back on
Commits
The changes can be found at https://github.com/fsk-software/mynotes/commit/75bd19218d46e23066e067b9506895ab9a56359f.
No comments :
Post a Comment