I write a program to capture screen touch event. But when the screen is off, I can't get any MotionEvent ev
.
private PowerManager pm = null;
private PowerManager.WakeLock wl = null;
this.pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
this.wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "test");
wl.acquire();
@Override
public boolean dispatchTouchEvent (MotionEvent ev) {
if(ev.getAction() == MotionEvent.ACTION_DOWN)
Log.i("test", "!!!");
return true;
}