Code example for PowerManager.WakeLock

Methods: acquire

0
 
	@Override 
	public void onCreate() { 
		super.onCreate(); 
		wakeLock = Dev.newCpuWakeLock();
		wakeLock.acquire();
	} 
 
	@Override 
	public void onDestroy() { 
		super.onDestroy(); 
		wakeLock.release();
		wakeLock = null;
	} 
 
} 
Experience pair programming with AI  Get Codota for Java