I am creating a car computer with a tablet (Asus MemoPad ME572C). I have an arduino connected with the tablet through an usb to serial adapter. Now i need to be able to turn the screen on from standby.
What i tried is putting this in the oncreate of an activity
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD |
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED |
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON |
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
);
This is working but if i leave the tablet for a minute or so turned into standby, i can't wake it anymore. It looks like the tablet has stopped my service or just doesn't listen on the serial port.
I don't know how to debug this or solve it. Hope you can help.
PS: sorry my english isn't very good.