views:

39

answers:

1

Trying to understand the Android framework model. I have an application that needs to have several threads running. On thread gets GPS fixes, another picks up GPS fixes and pushes them to server, and yet another occasionally polls a server for dispatched orders. Some of these threads update status Views as well.

Since I am new to Android, the application framework model hasn't clicked for me. Where are these threads started? Right now I start the threads in the initial Activity, but if I understand it right, once that Activity goes invisible it is stopped. Furthermore, I have to track GPS and network statistics so that I can have a View which may (or may not) be the active View.

Just looking for a little guidance from folks who have tackled these issues on this platform.

Thanks.

A: 

If you are running a thread calling finish() to your activity will not stop your thread. Thread will complete in the backend and will stop automatically.

Rahul