diff --git a/framework/src/org/apache/cordova/App.java b/framework/src/org/apache/cordova/App.java index 160923ca..9e8c1fe0 100755 --- a/framework/src/org/apache/cordova/App.java +++ b/framework/src/org/apache/cordova/App.java @@ -287,7 +287,7 @@ public class App extends CordovaPlugin { }; // Register the receiver - this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter); + webView.getContext().registerReceiver(this.telephonyReceiver, intentFilter); } /* @@ -296,6 +296,6 @@ public class App extends CordovaPlugin { */ public void onDestroy() { - this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver); + webView.getContext().unregisterReceiver(this.telephonyReceiver); } }