Service to check system time continuously in android

341 views
Skip to first unread message

Nitee Shah

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

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

MaheshSharma

unread,
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

unread,
Mar 19, 2012, 1:24:17 AM3/19/12
to pune...@googlegroups.com
Hello,

        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 http://pune-gtug.blogspot.com 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 pune...@googlegroups.com
 To unsubscribe from this group, send email to pune-gtug-...@googlegroups.com
 For more options, visit this group at http://groups.google.co.in/group/pune-gtug?hl=en-GB

Reply all
Reply to author
Forward
0 new messages