Service or thread: To do background functionality in activity, is it better to start service or thread? why?
you can use both, because both will do same thing.
If that background functionality is co-related with activity, then use thread. else launch it in a new service with thread in the service.
whether that background functionality has any thing to do with activity or not, it is always better to use service with a thread, rather than using thread with activity.
if you want some background functionality in activity, directly for only thread. no need of service there.
It always depends on the requirement. if the background functionality is related or tightly coupled with activity, then use thread. but if you want some thing to do in background irrespective of whether activity is alive or not, then go for service-with thread.
Back To Top