Some questions about services

Put your problem here if it does not fit any of the other categories.

Some questions about services

Postby phate » Wed Aug 08, 2012 4:17 pm

Hello, I'm trying to do a periodic service but I have some questions, as it's my first time doing something like this

1)Basic service code would be:
Code: Select all
while(true){
//do operations
//sleep for n seconds
}


in order to stop it, do stopService() call make me exit from that loop?And is this the right way to do a periodic service?

2) As service job is very long android doc suggests to use a serviceIntent or create a thread in the service itself: what's the difference?And what is the best choice?

3)What is the best way to pass to service a LONG data list?
phate
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Aug 08, 2012 4:12 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 18 guests