omaraflak / Bluetooth-Library

Bluetooth client library for Android.
198 stars 62 forks source link

Leaked Intent Reciever #21

Closed mattdabin closed 6 years ago

mattdabin commented 6 years ago

Hi,

First of all thank you for you effort in the amazing library. I have no problem using this library on Android API 25 when I load on to Android API 27 I get the following error.

" android.app.IntentReceiverLeaked: Activity com.example.mattd.X.Patient has leaked IntentReceiver me.aflak.bluetooth.Bluetooth$7@7be2431 that was originally registered here. Are you missing a call to unregisterReceiver()?"

This happens when the connection is initiated. I am using a Bluetooth classic device.

Again the application worked fine on android API 25.

Any help would be greatly appreciated.

Cheers, Matt

omaraflak commented 6 years ago

Hi, thank you for reporting that ! You're right I just checked the code. I going to change that, some other stuff, and push a new version. I'll keep you updated !

mattdabin commented 6 years ago

Hi Omar, Thank you. Any suggestions for an immediate work around? Cheers, Matt

omaraflak commented 6 years ago

No need to. I just uploaded a new version of the library with some corrections. You can start using it by adding :

implementation 'me.aflak.libraries:bluetooth:1.3.3'

Good luck !