Skip to content Skip to sidebar Skip to footer

Maintain Bluetooth Connection Even After Call To Onstop

Currently, I connect my tablet to other devices (through Bluetooth). The connection is successful, but if the activity is paused and stopped, say when the home screen is pressed, i

Solution 1:

Handling that in your Activity is not a way to go - as you noticed, Activities stop executing and drop your Bluetooth connections.

You should create a Service which will handle your Bluetooth connectivity and keep running after your main Activity stops. Be sure to add an icon to notification bar to keep users notified that your application is still running in the background and burning battery.

Post a Comment for "Maintain Bluetooth Connection Even After Call To Onstop"