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

  • Home
  • SEARCH
  • 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 6170477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:02:32+00:00 2026-05-23T23:02:32+00:00

I want to implement local notification in my clock app.Basically i want that a

  • 0

I want to implement local notification in my clock app.Basically i want that a music file should be played after every half an hour like in ship’s clock in which chimes are played after every 30 minutes.

Can anyone give rough idea as how i can implement this functionality even when the app enters in background?

  • 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-05-23T23:02:33+00:00Added an answer on May 23, 2026 at 11:02 pm

    I recently used the Local notification stuff and used the following functions

    //Setting up the Local Notifications

    for (int i= 1 ; i<=10; i++) { //We here set 10 Notification after every 30 minutes from now you can modify it accordingly
    
        NSDate *scheduled = [[NSDate date] dateByAddingTimeInterval:60*30*i]; //These are seconds
    
        NSDictionary* dataDict = [NSDictionary dictionaryWithObjectsAndKeys:scheduled,FIRE_TIME_KEY,@"Background Notification received",NOTIFICATION_MESSAGE_KEY,nil];
    
        [self scheduleNotificationWithItem:dataDict];
    
    }
    

    Where scheduleNotificationWithItem is defined as

    - (void)scheduleNotificationWithItem:(NSDictionary*)item  {
    
        UILocalNotification *localNotification = [[UILocalNotification alloc] init];
    
        if (localNotification == nil)   return;
    
        localNotification.fireDate =  [item valueForKey:FIRE_TIME_KEY];
    
        localNotification.timeZone = [NSTimeZone defaultTimeZone];
    
        localNotification.alertBody = [NSString stringWithFormat:NSLocalizedString(@"%@", nil), [item valueForKey:NOTIFICATION_MESSAGE_KEY]];
    
        localNotification.alertAction = NSLocalizedString(@"View Details", nil);
    
        localNotification.soundName = UILocalNotificationDefaultSoundName;
    
        localNotification.userInfo = item;
    
        [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
    
        [localNotification release];
    }
    

    Finally you can handle these notifications as

    You can handle these notifications as follows

    - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
    
    // Do the required work you can obtain additional Info via notification.userInfo which happens to be a dictionary
    
    }
    

    reading the developer documentation will help you more to understand the stuff.Hope it helps

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

Sidebar

Related Questions

i want implement geolocation notification like the app reminders. this is what i have
I am using DataNucleus' implement of JDO on a local H2 database. I want
Microsoft has announce that WindowsLiveID become a OpenID provider . I want implement it
I want to implement file uploading with behaviour which is commonly seen in various
I want to implement a basic search/replace translation table in C; that is, it
I want to implement dynamic, client side file generation in javascript. Is it possible?
I want to implement treegrid using local proxy. Is it possible? I have tried
I'm developing a simple site for local student contest. I want to implement some
I am creating an iPhone app and in that I want to download multiple
In my application I want to use the Local Notification. I don't know is

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.