*Question :1 => *
I want to run a service from 9 AM to 4 PM daily. I plans two method.Which
one is best?

*Method 1:*
*Inside Service:(This service initialized at on create of activity when
first time application starts)*

 if (9 AM <=current time<=4 PM)
{
  fetch data from server.
}

*Method 2:*
*In Activity oncreate use Alarm manager and start a service based on the
alarm manager.Then wake up next day  and start service.*
*
*
*Which method is best?*
*
*
*Question :2 => How to find a service is running or not programmatically?*
-- 
BY

R.RAMPRASAD

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to