@Override
 public void onDestroy() {
   Log.d(TAG, "onDestroy");
   super.onDestroy();
   mReactInstanceManager.onPause();
   mReactInstanceManager.onDestroy();
   mReactInstanceManager = null;
 }
  @Override
  protected void onPause() {
    super.onPause();

    if (mReactInstanceManager != null) {
      mReactInstanceManager.onPause();
    }
  }
  @Override
  protected void onPause() {
    super.onPause();

    mLifecycleState = LifecycleState.BEFORE_RESUME;

    overridePendingTransition(0, 0);

    if (mReactInstanceManager != null) {
      mReactInstanceManager.onPause();
    }
  }