Jump to content
Sign in to follow this  
Anto90

alarm clock play sound for 10 seconds

Recommended Posts

Hi at all,

I need to implement an alarm (ios and android) that rings at different times of the day. Is it possible to do it with the Kastri library by Dave Nottage?

I read that there are limitations on ios and I wanted to ask if there are specific examples to follow thanks. 

Andrea

Share this post


Link to post
4 hours ago, Anto90 said:

I need to implement an alarm (ios and android) that rings at different times of the day. Is it possible to do it with the Kastri library by Dave Nottage?

Probably best to schedule local notifications and associate them with a sound (that lasts for 10 seconds). There's documentation about it here. Note: Notification sounds on Android (since version 6) are associated with a channel, rather than a notification. 

 

The trick of course is that you would need to schedule the notifications a fair way in advance, in case the user does not open the app for some time.

 

I doubt there's any other way of reliably firing off an alarm at exact times - Android and iOS have made that kind of thing increasingly difficult to implement. I'm happy to be proven wrong 🙂

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×