Closed peitschie closed 4 months ago
Thank you @peitschie for looking into this. However I cannot reproduce the problem described in https://github.com/capacitor-community/bluetooth-le/issues/663. Do you have a case where that crash happened?
@allcontributors please add @peitschie for code and question
@pwespi
I've put up a pull request to add @peitschie! :tada:
@pwespi huh... you are 100% correct here.
I'd seen this on at least one of the registerReceivers on another plugin, and assumed it applied more widely than it actually does.
There is a carved out exception for System Broadcasts when using a Context#registerReceiver call: https://developer.android.com/about/versions/14/behavior-changes-14#system-broadcasts which looks like it covers all the usages you have here.
This change isn't necessary at all. Sorry for the wasted time.
I haven't got many devices to test this on currently, but this should be the code change needed here.