Here i mentioned the code for waking up the screen. i want the code is listen still the app is closed and the cpu is cleared and user can click the power button when ever my screen is unlock the app is sync like whatsapp.
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
wl = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "whatever");
super.onCreate(savedInstanceState);
wl.acquire();