Android examples for Android OS:Power
Wake ups the phone via PowerManager
//package com.java2s; import android.content.Context; import android.os.PowerManager; public class Main { /**//from ww w .j av a2 s . co m * Wake ups the phone. * @param context */ public static void partialWakeUpLock(Context context) { PowerManager pm = (PowerManager) context.getApplicationContext() .getSystemService(Context.POWER_SERVICE); PowerManager.WakeLock wakeLock = pm .newWakeLock( (PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP), "TAG"); wakeLock.acquire(); } }