Top "Powermanager" questions

PowerManager is a class in the Android SDK that gives control of the power state of the device.

Check if battery optimization is enabled or not for an app

Android 6 and 7 have some power optimizations (doze mode) which restrict app networking when device is not used. User may disable …

android powermanager android-powermanager
Android ACTION_SHUTDOWN Broadcast not working

Code - public class ShutdownReceiver extends BroadcastReceiver { private static final String TAG = "ShutdownReceiver"; @Override public void onReceive(final Context context, …

android bootcompleted powermanager
Reboot the phone on a button click

I am making an Android app that needs to have the phone reboot or turn off when a button is …

android powermanager
WakefulBroadcastReceiver is deprecated

For creating a receiver I'm extended WakefulBroadcastReceiver in my old project. But now it's deprecated. Instead of WakefulBroadcastReceiver which Receiver …

android android-broadcastreceiver receiver powermanager
Turn ON Screen programmatically on Android

I need to programmatically turn the screen on when the user turns off with power button, and yes I always …

android screen powermanager
What does "PowerManger.FULL_WAKE_LOCK is deprecated" mean?

I have this code: wakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE, "MyWakeLock"); …

android wakelock powermanager
What should I replace SCREEN_DIM_WAKE_LOCK with?

I am currently utilizing the below referenced code for a wake lock on an alarm notification activity. However, SCREEN_DIM_…

android powermanager
Android wake lock force close

Hello I am trying to implement a wake lock for an application. PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); PowerManager.…

android android-wake-lock powermanager