I have made myself familiar with how services work and how Bluetooth works. My code already works if I am in the app, but I want it to also work when it is not open.
So I basically want to make a service. When I am running the app I simply open a Bluetoothsocket and wait until the other device sends that it's ready.
Here are my questions:
Would opening a Bluetoothsocket with a device in the service as long as it's nearby be a big battery issue?
Is there any downside to leaving the socket up?
Would listening to an Inputstream the whole day drain a lot of battery? I assume so, and if yes is there a better way to activate the service?