2

I am creating a custom watch face for Android Wear, feature animations and transitions. The problem is, when going into Interactive Mode, the watch reverts to Ambient Mode too shortly after, not allowing for the animations to complete. I know there are battery and performance considerations, but this is an experimental project.

So, is there any way to control how long the watch face stays on Interactive Mode, or somehow delay it reverting back to Ambient Mode? Thanks!

krystian71115
  • 1,927
  • 17
  • 36

2 Answers2

3

You can hold a partial wake lock and keep animating. If you keep it for say 200ms after you enter ambient, it is not the end of the world. The lighting will be off, but the display should continue to work and finish the animation. After that release the wake lock.

gruszczy
  • 40,948
  • 31
  • 128
  • 181
0

Not direct and honest way way to control how long the watch face stays on Interactive Mode. I used for this some trick see-> https://stackoverflow.com/a/41200236/7310561

I will explain more widely

That's spell ligt on screen even in deep sleep.

PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
wakeLock = powerManager.newWakeLock((PowerManager.SCREEN_BRIGHT_WAKE_LOCK |    PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP), TAG);
wakeLock.setReferenceCounted(true);
if(!wakeLock.isHeld()) {
    wakeLock.acquire();
}

Trust me, im engineer.

Community
  • 1
  • 1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Matthew Verstraete Dec 19 '16 at 17:00