[mono-android] Turning display on and off
Stephan Steiner
stephan.steiner at gmail.com
Thu Dec 13 10:45:33 UTC 2012
The issue with that is that it requires special permissions my app doesn't
have. I'm not really looking to put the device to sleep, I merely want to
turn off the screen.
I found this:
http://stackoverflow.com/questions/3018716/android-turn-off-screen-when-close-to-face
so I guess I need a way to get a new wake lock with the value of
PROXIMITY_SCREEN_OFF_WAKE_LOCK but that value isn't available in M4A. And
the SpeakerProximity project is GPL'ed, and I don't suppose using java
interop (which I'd like to avoid at this juncture) would be considered
different from using the lib in a java project (so basically a nogo).
>
>gap: "Turning screen off, haven't tried in mono for android, but in java
this works"
>
>powerService.goToSleep( SystemClock.uptimeMillis() + 1 );
--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/Turning-display-on-and-off-tp5712611p5712616.html
Sent from the Mono for Android mailing list archive at Nabble.com.
More information about the Monodroid
mailing list