Search code examples
androidbackground-process

Android and background processes


I wrote an bluetooth app with my bt-connection established in a service, so the connection is still alive when I minimize my app.

But when watching my task manager, my app is still there. And when calling onDestroy in my app, I have to stop my Service.

But other apps like telegram or skype (whatsapp too I think) aren't in my task-manager visible but by having an incoming message they notify me nevertheless.

How is this even possible? How can I write my bluetooth connection like this, that I can really close my app and anyway the incoming messages will be handled?


Solution

  • The other apps might be having some light weight service running in other process which gets the data for the main app.Go to settings->application manager->running processes..you will see all the service..

    Other mechanism which apps use is port-directed sms. In such a scenario you don't need any service running.However port directed sms doesnt work on all the phone and for all the apps.