Wednesday, October 14, 2015

MyNotes: Marshmallow

 

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:

  1. Start an “M” emulator
  2. Install your app on the device
  3. Start a terminal
    1. adb shell dumpys deviceidle enable
    2. adb shell dumpsys battery unplug
      • (emulator screen turns off)
    3. adb shell dumpsys deviceidle step
      • output is IDLE_PENDING
    4. adb shell dumpsys deviceidle step
      • output is SENSING
    5. adb shell dumpsys deviceidle step
      • output is IDLE
    6. adb shell dumpsys deviceidle step
      • output is IDLE_MAINTENANCE

Disabling Dose Mode:

  1. In a terminal:
    1. adb shell dumpys deviceidle disable
    2. adb shell dumpsys battery ac
  2. 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