示例#1
0
 protected void onPostExecute(DefaultBean response) {
   if (response != null && response.getHttpCode().equals(AppConstants.OK)) taskCallback.done(true);
   else {
     alert.showAlertDialog(
         activity, "Attenzione!", "Si è verificato un problema. Riprovare!", false);
     taskCallback.done(false);
   }
 }
示例#2
0
 public void done(boolean res, DefaultBean response) {
   if (res && response.getHttpCode().equals(AppConstants.OK)) {
     pref = getApplicationContext().getSharedPreferences("MyPref", MODE_PRIVATE);
     SharedPreferences.Editor editor = pref.edit();
     pref.edit().putBoolean("token", true).commit();
     pref.edit().remove("EmailUtente").commit();
     pref.edit().remove("IdSessione").commit();
     Intent myIntent = new Intent(getApplicationContext(), SplashscreenActivity.class);
     startActivity(myIntent);
     this.finish();
   }
 }
示例#3
0
 // Done rispondiInvito
 public void done(boolean res, DefaultBean response, Long idGruppo, boolean answer) {
   cpv2.setVisibility(View.GONE);
   if (res && response.getHttpCode().equals(AppConstants.OK)) {
     Log.e(TAG, "Done RispondiInvito!");
     if (checkNetwork() && answer) {
       cpv.setVisibility(View.VISIBLE);
       PayloadBean p = new PayloadBean();
       p.setIdSessione(idSessione);
       p.setNuovoStato(AppConstants.GRUPPO);
       selectedGroup = idGruppo;
       statoSuccessivo = AppConstants.GRUPPO;
       new AggiornaStatoAT(getApplicationContext(), this, idSessione, this).execute(p);
     }
   }
 }