Ejemplo n.º 1
0
    @Override
    protected void onPostExecute(String result) {
      this.dialog.dismiss();

      if (result.equals(Boolean.TRUE.toString()) || result.equals(Boolean.FALSE.toString())) {
        HomeScreen.syncInProgress = false;
        HomeScreen.syncComplete = true;
        showBeans();
      } else {
        final AlertDialog dialog =
            ViewHelper.getOkModalWithCloseApp(
                HomeScreen.this, "Sync Failure", "Data Sync Failed. Please restart the App");
        dialog.setButton(
            DialogInterface.BUTTON_POSITIVE,
            "OK",
            new DialogInterface.OnClickListener() {

              public void onClick(DialogInterface dialog, int status) {
                dialog.dismiss();
                HomeScreen.syncInProgress = false;
                HomeScreen.syncComplete = false;
                HomeScreen.this.finish();
              }
            });
        dialog.show();
      }
    }
Ejemplo n.º 2
0
 public void doViewError(CommandContext commandContext) {
   Activity activity = (Activity) commandContext.getAppContext();
   ViewHelper.getOkModalWithCloseApp(
           activity,
           "App Error",
           "The "
               + Constants.channel
               + " is not ready. Please launch the App again in a few minutes")
       .show();
 }