Click here to Skip to main content
11,798,866 members (76,420 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Javascript PhoneGap

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 Smile | :)

Thanks in advance
Posted 26-Jun-13 3:06am
Edited 26-Jun-13 3:09am
Nelek at 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 at 27-Jun-13 2:32am
Thank you Nelek...your idea is useful..
Nelek at 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
0 CPallini 505
1 OriginalGriff 503
2 Richard MacCutchan 321
3 Maciej Los 245
4 phil.o 244
0 OriginalGriff 2,270
1 Maciej Los 1,810
2 KrunalRohit 1,496
3 CPallini 1,425
4 Richard MacCutchan 1,109

Advertise | Privacy | Mobile
Web02 | 2.8.151002.1 | Last Updated 26 Jun 2013
Copyright © CodeProject, 1999-2015
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