@Override
  protected void onResume() {
    super.onResume();
    LedApplication.getConnectionObserver().start();
    LedApplication.tryConnect();

    if (mRestoreViewAfterConnect != null) setFragment(mRestoreViewAfterConnect);
    else replaceByScenesView();
  }
 @Override
 protected void onUserLeaveHint() {
   super.onUserLeaveHint();
   LedApplication.getConnectionObserver().stop();
   LedApplication.getServerconnection().CloseConnection();
 }