diff --git a/src/android/IntentShim.java b/src/android/IntentShim.java index 967109a..77daccf 100644 --- a/src/android/IntentShim.java +++ b/src/android/IntentShim.java @@ -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")) {