Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

ADB shell detect close/open flip cover

$
0
0
I want to detect the case status (open/close).
In the case without window I could use detection screen status (on/off) like this:
Code:

adb shell dumpsys power | grep mScreenOn
In the case with the window (eg. LG Circle Case) after closing the case I can't use the detection screen status (case closed but the screen may be ON).

I want to detect only case status (using a magnet sensor in the corner of the case and screen)

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>