Prevent app from sleeping

Is there an API for an app to prevent sleep?

Our app - a digital signage app which is very well supported on Fire OS and the new Amazon Signage Stick - must remain running in the foreground at all times.

When we last checked, there wasn’t an explicit API for this, causing us to resort to hacks like running media players. This really needs to be an explicit API similar to Android wakelocks (but pick whatever design you want).

Hi @mikey,

Thank you for your question about preventing app from sleeping on Vega.

Our team is looking into it and will provide an update as soon as we have more information.

Thanks for helping us improve the Vega platform.

Warm regards,
Aishwarya

Hi @mikey,

Thank you for your patience and for sharing the details about your digital signage application.

I’ve reviewed your request with our technical team. Unfortunately, Vega’s current architecture doesn’t support the capabilities you need — specifically, there is no wake lock or equivalent API to prevent the system from sleeping or keep an app running in the foreground at all times. The platform is designed with managed lifecycle controls for consumer entertainment apps.

While ambient mode settings are available, they don’t offer the infinite timeout your use case requires.

I understand this isn’t the answer you were hoping for, and I appreciate you considering Vega for your application. Please feel free to reach back to me if you have any questions!

Warm regards,
Aishwarya

Thanks for the fast review!

And yet, we can work around that issue by playing a (hidden/small) video infinitely. So the absence of the API doesn’t prevent the capability - but it does make it brittle and non-explicit to support.

Can you please accept it as a feature request for Vega? We work with Fire OS and Amazon Signage Stick as well, both have this capability.

Imagine Amazon wanted to review apps based on their use (or abuse) of the “stay awake” behavior - I have to imagine that sort of static analysis would be much easier with an explicit API or manifest flag.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.