SamFisher83 SamFisher83 - 3 years ago 98
Android Question

What is the best option for a continuous background thread in Android?

I want to write an application that listens to things in the background and displays things on the UI based on what it hears. I was looking at the options available and AsyncTask is one of them. However it says use it only for short bursts of work. What is the best way to have a continuous background operation?

Answer Source

A Service is what you're looking for:

And in your case, probably one that is running on the foreground:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download