Small application to test functionality of WifiLock and WakeLock on Android
Clone or download
Latest commit ce8c529 Oct 25, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
WakeLock_WifiLock_Exerciser Updating build compile SDK to 28 (Pie), latest. Oct 25, 2018
LICENSE Initial commit Apr 21, 2017 Fixing a couple of bugs and updating gradle file Jun 19, 2018 Updates for Android P testing Jun 21, 2018


Small application to test functionality of WifiLock and WakeLock on Android

EMDK Dependency

Application will run on both Zebra and non-Zebra Android devices. When running on Zebra devices the application will take advantage of MX to enable or disable battery optimizations via buttons on the UI. This does require:

This only affects the bottom two buttons on the UI which refer to controlling BatteryOptimizations via MX

Repository includes a small python 3 server to receive posts from the application


Determine current wake / wifi locks in effect as follows:

adb shell dumpsys power
adb shell dumpsys wifi

Optionally, force the device power state to idle as follows:

adb shell dumpsys battery unplug
adb shell dumpsys deviceidle force-idle
(verify with) adb shell dumpsys deviceidle (& observe mState)


  • Uncomment the annotated line in onCreate() to create a separate wake lock on launch
  • Tested on TC51
  • Would never pass PlayStore criteria as includes ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
  • Make sure nothing else on your device holds wake locks before running tests
  • Zebra devices also have additional settings to keep wifi on during standby (under advanced WiFi settings)