-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Description
I was getting an error message when I shut down my application and, being hopeless at Java, couldn't work out where to put said call. I spoke to Matt Kane and, although they're no longer developing this plugin, he very kindly gave me the following code, which works fine when inserted into HeadsetWatcher.java at line 29 (ie in the HeadsetWatcher class). I'm using Cordova 2.0.0.
He did ask me to send a Pull request if it works, but that would involve me installing and learning how to use github and I might just end up breaking things at either end, so I figured this was easier!
@OverRide
public void onDestroy() {
this.cordova.getActivity().unregisterReceiver(headsetReceiver);
super.onDestroy();
}
Thanks Matt.
Metadata
Metadata
Assignees
Labels
No labels