Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8181841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:39:30+00:00 2026-06-07T00:39:30+00:00

I’m trying to add an in-background alarm clock feature to an app I’m developing.

  • 0

I’m trying to add an in-background alarm clock feature to an app I’m developing.

I have read up on the UILocalNotification object and its use, and am aware that it is limited to 30 seconds of audio.

I was thinking of scheduling multiple notifications (say, 5 of them) spaced 30 seconds apart to mimic continuous play, but the problem with this approach is that if the user hits Close, I won’t be able to cancel any of the subsequent notifications.

As far as I know, it is impossible to remove or hide the Close button without hiding the notification entirely (i.e., setting the alertBody property to Nil).

So, I thought I might use the repeatInterval property to cause the notification to pop up every 30 seconds, but it seems that I can only set the interval to one minute or one second, and nothing in between.

The feature is meant to allow the user to choose between music and beeps for alarm audio; it seems I may have found a way to do the beeps – setting the repeatInterval to one second, create a second’s worth of beeps (which would need to be timed to cleanly repeat) and use that as the notification sound.

However, for the music, this approach limits me to playing 30 seconds of audio, followed by a 30-second gap, followed by 30 seconds of audio, and so on.

I know that there is no straightforward solution here, from my reading of other posts and resources; no third-party app has access to the same functionality as the built-in alarm clock. I am hoping that someone has found a workaround or thinks of something really clever.

UPDATE: I have found that the repeatInterval doesn’t help me in this case, as I can’t cancel the repetitions without launching the app.

For the time being I have decided not to use a notification as an alarm per se, but have changed the feature to be a reminder (more along the lines of what the notification is intended for).

If I come up with a way to implement user-friendly, reliable alarm functionality to an app, I will update this post.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T00:39:31+00:00Added an answer on June 7, 2026 at 12:39 am

    I am afraid you cannot accomplish this..reason being as you stated the ‘Close’ button. You won’t be getting any call back in the app if Close button is tapped. Further even if you present notifications every 30 seconds, then there will be multiple notifications on the screen which user has to view or close. So the user experience will be crappy. I would recommended making it clear to the users that they can not set alarm with a custom sound more than 30 seconds.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to select an H1 element which is the second-child in its group
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.