I use WiFi ADB Active
or ADB Wireless
application to debug my build app in eclipse over Wifi instead USB debuging
.
how I can keep turn on my device during debug? no options in this application to stay awake.
When BuildConfig.DEBUG == true, spawn a thread, that calls Debug.WatiForDebugger then get a full wake lock. Periodically poll Debug.isDebuggerConnected(), releasing the wake lock if not.
WaitForDebugger will lock the thread until a debugger is attached (over wifi or not) - if that happens the wakelock will keep the device from sleeping. Once the debugger is disconnected, the next time the background thread checks the status of the debugger, it will release the wake lock and allow the device to sleep again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With