Code example for PowerManager.WakeLock

Methods: setReferenceCounted

			this.runnable = runnable;
			PowerManager pm = (PowerManager) context
			this.wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
		public void onReceive(Context context, Intent intent) {
			 * The #run() call can block, so do it on a background thread. The 
			 * phone could sleep after onReceive() exits but before the 
			 * background thread completes, so to prevent that, take a wakelock 
			 * before returning and release it after the background thread 
			 * completes. 
			new Thread(new Runnable() {