public void unbindService() { if (_helper != null) { _helper.dispose(); _helper = null; } destroyBroadcasts(); }
// We're being destroyed. It's important to dispose of the helper here! @Override public void onDestroy() { super.onDestroy(); // very important: Log.d(TAG, "Destroying helper."); if (mHelper != null) mHelper.dispose(); mHelper = null; }