Question

I have an Android Service that starts up an admin Android application at boot time. Note that I cannot do away with the app as I need it for admin interaction.

The Android Service + app is the server to around 10 Android clients over a LAN connection. I plan to use nanohttpd (a very light-weight http server) to act as http server for communication with the clients. Now, the question is, should I implement nanohttpd in the Service part or in the app part of the server? What is the best approach?

Was it helpful?

Solution

Definitely use Service, they are just exactly what you need - a lot of work in the background.

OTHER TIPS

Services will always run until you stop them, so yes, that is the way to do it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top