I am following instructions on this android page to switch android to doz mode to test my app, I have used a real device as well as emulator. But in both cases when I give the second command once or several times, which is
adb shell dympsys deviceidle step
it only says Stepped: ACTIVE Before giving the commands I turned off/locked the device as well but no use. I wanted how my app behaves in doze mode but nothing seems to work,
I also tried
adb shell dumpsys deviceidle force-idle
but this gives me the message below.
Unable to go idle; not enabled
Please advise. I am using motorola Moto G 2nd generation android 6.0 and also used emulator x86_64 bit image with android studio version 1.5.1