voroshkov / Chorus-RF-Laptimer

MIT License
186 stars 54 forks source link

Fix crash when enabling bluetooth after starting the app #108

Open Smeat opened 5 years ago

Smeat commented 5 years ago

When enabling bluetooth after starting the app and trying to connect, the app crashes due to mChatService being null. This adds a listener to the bluetooth state and starts the bluetooth service when the user enables bluetooth.

I never did much in Android, so I hope implementing it this way is correct.