I will like to send data from my app to a server. I collect data from a device that is connected via Bluetooth to the phone. The user opens the app, pair the android phone to the device and then the device sends the data to the phone and the phone sends it to the server.
Because the user needs to use the phone, like make a phone call, send a message or anything else. I need to send the data continuously, every 5 min but the problem is when the app is not active it will not send the data to the server.
It will be better to use a widget? or a service in background? I hope you can help me out.
Thank you.