@Override
  public void onSuccessSend(String email) {

    //  setOnVerify();

    user = new User(ctx);
    user.setEmail(email);

    // setOnRegister();

    recoverPasswordView.showDialogSuccessSend();
    recoverPasswordView.hideProgress();
    recoverPasswordView.navigateToCode(email);
    recoverPasswordView.finished();
  }
 public RecoverPasswordPresenterImpl(RecoverPasswordView recoverPasswordView) {
   this.recoverPasswordView = recoverPasswordView;
   interactor = new RecoverPasswordInteractorImpl();
   ctx = recoverPasswordView.getContext();
   validator = new Validation(ctx);
   extras = ((Activity) ctx).getIntent().getExtras();
   prefs = ctx.getSharedPreferences(Config.PREF_TAG, Context.MODE_PRIVATE);
   editor = prefs.edit();
 }
  @Override
  public void validateEmail(String email) {

    recoverPasswordView.showProgress();
    user = new User(ctx);

    if (extras != null) email = extras.getString("email");
    else email = user.getEmail();

    Log.i("VP_email", email.toString());

    JSONObject param = new JSONObject();

    try {
      param.put("email", email);
    } catch (JSONException e) {
      Log.e("VP_JSONException", e.toString());
    }

    interactor.sendEmail(param, validator, this);
  }
 @Override
 public void onError() {
   recoverPasswordView.showDialogError();
   recoverPasswordView.hideProgress();
 }
 @Override
 public void onInternetError() {
   recoverPasswordView.showDialogInternetError();
 }
 @Override
 public void onFailedSend() {
   recoverPasswordView.showDialogFailedSend();
   recoverPasswordView.hideProgress();
 }
 @Override
 public void onEmptyEmailError() {
   recoverPasswordView.showDialogEmptyemail();
   recoverPasswordView.hideProgress();
 }