public void onDestroy() { super.onDestroy(); if (mGcmRegistrationListener != null) { mAppController.removeListener(mGcmRegistrationListener); } mGcm.close(); }