I have a problem with acquiring a WakeLock. It seems not to work. I am trying to acquire a FULL_WAKE_LOCK but neither the display gets enabled nor is my app able to perform tasks.
I am using the following permission: android.permission.WAKE_LOCK
My acquire code looks like this:
PowerManager pm = (PowerManager) getBaseContext().getSystemService(Context.POWER_SERVICE);
wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK|PowerManager.ACQUIRE_CAUSES_WAKEUP, "My Tag");
wl.acquire();
What am i doing wrong?
Edit: Added another flag ACQUIRE_CAUSES_WAKEUP ... but no changes in behavior
Edit2: All i am trying to do is, to play music and to wake my device up upon a certain event. The music is working perfectrly but the device stays black.