Service to check system time continuously in android

Skip to first unread message

Nitee Shah

Mar 17, 2012, 8:05:10 AM3/17/12
to Pune-GTUG, Shruti Lunkad, Sayali Kothari, tejashree deshpande

I am developing time based profile app. I want to activate a profile
based on pre-set time. So, How will I be able to check system time
continuously and activate the profile accordingly.

Thanks and Regards,
Nitee A. Shah


Mar 17, 2012, 6:26:01 PM3/17/12
to Pune-GTUG
Off the head :
a) Check current system time, say s.
b) diff = pre_set_time - s.
c) Schedule a AlarmManager to fire at that moment. Rest Android will
take care of.
d) Repeat a,b,c each time you reboot.

Nitee Shah

Mar 19, 2012, 1:24:17 AM3/19/12

        Exactly where do we repeat those (a,b,c) steps? Actually we want this service should be running throughout the application from its installation. So there is no chance of rebooting the device ..! So, what should we implement??

Thanks and Regards,
Nitee A. Shah

Visit our Blog at for discussions, articles and videos.
Disclaimer - Please note Pune-GTUG is an independent group and opinions mentioned here are of individuals alone and in no way related to "Google", the corporation.

You received this message because you are subscribed to the Google Groups "Pune-GTUG" group.
 To post to this group, send email to
 To unsubscribe from this group, send email to
 For more options, visit this group at

Reply all
Reply to author
0 new messages