public void liveCardUnpublish() { if (liveCard != null) { liveCard.getSurfaceHolder().removeCallback(this); liveCard.unpublish(); } liveCard = null; }
@Override public void onDestroy() { if (mLiveCard != null && mLiveCard.isPublished()) { mLiveCard.getSurfaceHolder().removeCallback(mTimerDrawer); mLiveCard.unpublish(); mLiveCard = null; mTimerDrawer.getTimer().reset(); } super.onDestroy(); }