Click here to Skip to main content
13,052,163 members (40,544 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I am new to phonegap..

Right now i am developing simple android application of my own Interest.

what i'm doing here is that, i am storing date of birth of all of my friends manually.

The application should alert me Whenever it finds any birthday of my friends....

For that, i need to check my table whether any of my friends having birthday or not.. and i need to know here , How to Fire an Event at certain hour and only once a day???

Any ideas would be appreciated :)

Thanks in advance
Posted 26-Jun-13 3:06am
Updated 26-Jun-13 3:09am
Nelek 26-Jun-13 9:29am
If you want to do your reminder, you should read the date&time of the phone, so if you already have it... compare the time with, let's say, if ((current_time >= 09:00) AND (today_updated==false)){call update(); today_updated==true;} or something similar, and compare another time with 23:55 so you can reset the "today_updated" flag.
Ram1419 27-Jun-13 2:32am
Thank you Nelek...your idea is useful..
Nelek 27-Jun-13 13:06pm
You are welcome :)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I know nothing about phonegap, but as for javascript:

you can use the JS-Function

setTimeout(/javascript function/,milliseconds);

It executes the Function you pass after a specified time. For example

var birthday = /* a value you presumably somehow get from your phonegap framework thing*/
var now =;
setTimeout(reminder, birthday - now);  /*where reminder is another javascript function*/

Something this way

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 26 Jun 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100