Java tutorial
//package com.java2s; import android.content.Context; import android.os.PowerManager; public class Main { private static PowerManager.WakeLock wl = null; public static void wakeLockOn(Context context) { PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); if (wl == null) wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, "CLOCK_ALARM"); wl.acquire(); } }