public void scanComplete(Payload response) {
    if (response.getResponseData().size() > 0) {
      if (messageContainer.getVisibility() != View.VISIBLE) {
        messageContainer.setVisibility(View.VISIBLE);
        messageButton.setOnClickListener(
            new OnClickListener() {

              public void onClick(View view) {
                @SuppressWarnings("unchecked")
                ArrayList<Object> m = (ArrayList<Object>) view.getTag();
                Intent i = new Intent(OppiaMobileActivity.this, DownloadMediaActivity.class);
                Bundle tb = new Bundle();
                tb.putSerializable(DownloadMediaActivity.TAG, m);
                i.putExtras(tb);
                startActivity(i);
              }
            });
        animateScanMediaMessage();
      }

      messageText.setText(this.getString(R.string.info_scan_media_missing));
      messageButton.setText(this.getString(R.string.scan_media_download_button));
      messageButton.setTag(response.getResponseData());
      updateLastScan(0);
    } else {
      hideScanMediaMessage();
      messageButton.setOnClickListener(null);
      messageButton.setTag(null);
      long now = System.currentTimeMillis() / 1000;
      updateLastScan(now);
    }
  }
 public void updateActivityComplete(Payload response) {
   Course course = (Course) response.getData().get(0);
   if (progressDialog != null) {
     progressDialog.dismiss();
   }
   Toast.makeText(
           OppiaMobileActivity.this,
           getString(
               response.isResult()
                   ? R.string.course_updating_success
                   : R.string.course_updating_error,
               (course != null) ? course.getShortname() : ""),
           Toast.LENGTH_LONG)
       .show();
   displayCourses(userId);
 }
 // @Override
 public void onCourseDeletionComplete(Payload response) {
   if (response.isResult()) {
     updateLastScan(0);
   }
   if (progressDialog != null) {
     progressDialog.dismiss();
   }
   Toast.makeText(
           OppiaMobileActivity.this,
           getString(
               response.isResult()
                   ? R.string.course_deleting_success
                   : R.string.course_deleting_error),
           Toast.LENGTH_LONG)
       .show();
   displayCourses(userId);
 }