Add this to your activity:

@Override
    public void onCreate(Bundle savedInstanceState) {
        wakeLock_ = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "
MainActivity");
    }
    
    @Override
    protected void onStart() {
        super.onStart();
        wakeLock_.acquire();
    }

    
    @Override
    protected void onStop() {
        wakeLock_.release();
    }


And this to your manifest:

<uses-permission android:name="android.permission.WAKE_LOCK" />



-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to