bcsphere/bluetooth — pull request #29 by mrichie (2014-11-05 03:02:16+00:00)
Title: BC Receiver should unregister on Destroy

as BC Receiver unregister after APP Activity exit, it will cause error like this at Activity onCreate lifecycle

```
E/ActivityThread(2932): Activity xxx has leaked IntentReceiver org.bcsphere.bluetooth.BCBluetooth$2@41c05cf8 that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(2932): at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:805)
E/ActivityThread(2932): at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:606)
E/ActivityThread(2932): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1430)
E/ActivityThread(2932): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1410)
E/ActivityThread(2932): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1404)
E/ActivityThread(2932): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:467)
E/ActivityThread(2932): at org.bcsphere.bluetooth.BCBluetooth.initialize(BCBluetooth.java:72)
E/ActivityThread(2932): at org.apache.cordova.PluginEntry.createPlugin(PluginEntry.java:96)
E/ActivityThread(2932): at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:195)
E/ActivityThread(2932): at org.apache.cordova.PluginManager.init(PluginManager.java:106)
E/ActivityThread(2932): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:478)
E/ActivityThread(2932): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:465)
E/ActivityThread(2932): at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:435)
E/ActivityThread(2932): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:395)
E/ActivityThread(2932): at org.xxx.onCreate(Baby.java:38)
E/ActivityThread(2932): at android.app.Activity.performCreate(Activity.java:5231)
```