Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
Big fix if try to unregister a receiver twice
Browse files Browse the repository at this point in the history
  • Loading branch information
darryncampbell committed Apr 17, 2017
1 parent fe3a08e commit 4976d53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/android/IntentShim.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ else if (action.equals("sendBroadcast"))
}
else if (action.equals("unregisterBroadcastReceiver"))
{
((CordovaActivity)this.cordova.getActivity()).unregisterReceiver(myBroadcastReceiver);
try
{
((CordovaActivity)this.cordova.getActivity()).unregisterReceiver(myBroadcastReceiver);
}
catch (IllegalArgumentException e) {}
}
else if (action.equals("onIntent"))
{
Expand Down

0 comments on commit 4976d53

Please sign in to comment.