Coder Social home page Coder Social logo

awmcc / wakelock_wifilock_exerciser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from darryncampbell/wakelock_wifilock_exerciser

0.0 2.0 0.0 234 KB

Small application to test functionality of WifiLock and WakeLock on Android

License: MIT License

Java 96.61% Python 3.39%

wakelock_wifilock_exerciser's Introduction

WakeLock_WifiLock_Exerciser

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

python dummy-web-server.py

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)

Notes

  • 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.