I am using the official android watch face API and I want to keep the screen on for a couple of seconds during an animation so that the screen doesn't go into ambient mode during the animation and once the animation is finished, I want to reset everything back to normal, is this possible? My class extends CanvasWatchFaceService and I am also extending the CanvasWatchFaceService.Engine So I want something similar to this but for a watchface:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
Then this:
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON).