How to turn off screen of android phone programmatically? I tried using following code with no luck
PowerManager mPowerManager = (PowerManager) getSystemService(POWER_SERVICE);
mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MYTAG");
mWakeLock.acquire();