Long running app to make a sound every 30secs #341
floubaresse
started this conversation in
Developer Feedback
Replies: 1 comment 2 replies
-
// don't turn off the screen for 600 seconds
import { setPageBrightTime } from '@zos/display'
const result = setPageBrightTime({
brightTime: 600 * 1000,
})
// don't turn off the screen on wrist down for 600 seconds
import { pauseDropWristScreenOff } from '@zos/display'
pauseDropWristScreenOff({
duration: 600 * 1000,
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to write an app that makes a sound every 30s while it's running (until the user stops it), and it is turning out to be harder that I thought...
I managed to play a media file with my sound when my mini app starts.
The problem is to trigger it every 30s.
I have tried the alarm API, but that does not seem to work (to start either an App Service or a Page).
Another option would be to keep the app running, but it gets terminated after 10s as per the documentation. Is there a way to keep it running?
What would be the best approach to design such an app?
Beta Was this translation helpful? Give feedback.
All reactions