Closed mattdsteele closed 2 years ago
I was worried that was going to be a large and risky change but the scope was really limited, I don't see any issues with the code and all my tests pass. Thank you! I will update the package version on npm to 2.1.0
Fixes #131
This PR adds support for calling
registerBroadcastReceiver
multiple times, while retaining previous registrations. Callbacks are associated with a newHashMap
, which also retains allBroadcastReceiver
objects.unregisterBroadcastReceiver
now unregisters all receivers; to support backwards compatibility.I tried to minimize the scope of this change, so other methods like
onIntent
andonActivityResult
continue to only support one registration. This meets all of my use cases, but if you'd prefer to update the other methods for consistency, let me know. Thanks!