Reputation: 11
My wakeup lock is not working in android. I have used below code:-
PowerManager powerManager = (PowerManager) this.getSystemService(POWER_SERVICE);
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
"MyApp::MyWakelockTag");
wakeLock.acquire(IDLE_DELAY_MINUTES+1000);
In the manifest file I have also mentioned:-
<uses-permission android:name="android.permission.WAKE_LOCK" />
What is wrong in my code?
Upvotes: 0
Views: 70