I have a big service module which handles bluetooth connectivity with my remote device, all working very well now. Currently, the service remains running when I exit my app and this is what worries me - if another bluetooth device attempts to connect to the tablet, it will run into my service, with unpredictable results (most probably just results in bluetooth admin re-init).
I also seem to remember that if I enter the OS bluetooth settings and start a scan, my service also has an impact on that - although its possible that has changed and I have forgotten.
At any rate: I guess one thing to do is terminate my app and the service completely when my app is closed by the user. I understand that manually terminating apps and services is bad practice though.
Or, I could terminate my app and leave the service running, but only allow the service to interact with connecting devices when it detects that my apps activities are running. This may or may not be helpful.
Or thirdly I can just leave it as is and not worry too much about it.
Any guidance as to what I should or shouldn't try would be much appreciated.
I also seem to remember that if I enter the OS bluetooth settings and start a scan, my service also has an impact on that - although its possible that has changed and I have forgotten.
At any rate: I guess one thing to do is terminate my app and the service completely when my app is closed by the user. I understand that manually terminating apps and services is bad practice though.
Or, I could terminate my app and leave the service running, but only allow the service to interact with connecting devices when it detects that my apps activities are running. This may or may not be helpful.
Or thirdly I can just leave it as is and not worry too much about it.
Any guidance as to what I should or shouldn't try would be much appreciated.