Example usage for android.app ProgressDialog ProgressDialog

List of usage examples for android.app ProgressDialog ProgressDialog

Introduction

In this page you can find the example usage for android.app ProgressDialog ProgressDialog.

Prototype

public ProgressDialog(Context context) 

Source Link

Document

Creates a Progress dialog.

Usage

From source file:cl.mmoscoso.geocomm.sync.GeoCommGetPointsAsyncTask.java

public GeoCommGetPointsAsyncTask(Context context, String hn, int id, List<GeoCommPoint> points) {
    this.context = context;
    this.hostname = hn;
    this.id = id;
    this.points = points;
    this.mProgressDialog = new ProgressDialog(context);
    this.mProgressDialog.setMessage(this.context.getResources().getString(R.string.Loading));
    this.mProgressDialog.setIndeterminate(false);
    this.mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    this.mProgressDialog.setCancelable(true);
}

From source file:net.kourlas.voipms_sms.preferences.DidPreference.java

@Override
protected void onClick() {
    progressDialog = new ProgressDialog(getContext());
    progressDialog.setMessage(//  w  ww  . j  a va  2s  .com
            getContext().getApplicationContext().getString(R.string.preferences_account_did_status));
    progressDialog.setCancelable(false);
    progressDialog.show();

    SelectDidTask task = new SelectDidTask(this);

    if (preferences.getEmail().equals("")) {
        task.cleanup(false, null, applicationContext.getString(R.string.preferences_account_did_error_email));
        return;
    }

    if (preferences.getPassword().equals("")) {
        task.cleanup(false, null,
                applicationContext.getString(R.string.preferences_account_did_error_password));
        return;
    }

    if (!Utils.isNetworkConnectionAvailable(applicationContext)) {
        task.cleanup(false, null, applicationContext.getString(R.string.preferences_account_did_error_network));
        return;
    }

    try {
        String voipUrl = "https://www.voip.ms/api/v1/rest.php?" + "api_username="
                + URLEncoder.encode(preferences.getEmail(), "UTF-8") + "&" + "api_password="
                + URLEncoder.encode(preferences.getPassword(), "UTF-8") + "&" + "method=getDIDsInfo";
        task.start(voipUrl);
    } catch (UnsupportedEncodingException ex) {
        // This should never happen since the encoding (UTF-8) is hardcoded
        throw new Error(ex);
    }
}

From source file:cl.mmoscoso.geocomm.sync.GeoCommGetRoutesAsyncTask.java

/**
 * /*from   www .j a v  a2  s  . c  om*/
 * @param cont
 * @param url
 * @param username
 * @param password
 */
public GeoCommGetRoutesAsyncTask(Context cont, String host, List<GeoCommRoute> routes, ListView listview) {
    this.context = cont;
    this.list_routes = routes;
    this.listview = listview;
    this.hostname = host;

    this.mProgressDialog = new ProgressDialog(context);
    this.mProgressDialog.setMessage(context.getResources().getString(R.string.mssg_loading_routes));
    this.mProgressDialog.setIndeterminate(false);
    this.mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    this.mProgressDialog.setCancelable(true);

}

From source file:eu.codeplumbers.cosi.api.tasks.CheckDesignDocumentsTask.java

public CheckDesignDocumentsTask(Fragment connectFragment) {
    this.connectFragment = connectFragment;

    Device device = Device.registeredDevice();

    // cozy register device url
    this.url = device.getUrl() + "/ds-api/request/???/";

    // concatenate username and password with colon for authentication
    final String credentials = device.getLogin() + ":" + device.getPassword();
    authHeader = "Basic " + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);

    dialog = new ProgressDialog(connectFragment.getActivity());
    dialog.setCancelable(false);//  ww w .j a v  a 2  s.  com
    dialog.setMessage("Please wait");
    dialog.setIndeterminate(true);
    dialog.show();

}

From source file:eu.codeplumbers.cosi.api.tasks.UnregisterDeviceTask.java

public UnregisterDeviceTask(AboutFragment aboutFragment, String password) {
    this.aboutFragment = aboutFragment;
    resultDevice = null;/*from  w ww .  j  ava2  s.c  o m*/

    Device device = Device.registeredDevice();

    // cozy register device url
    this.url = device.getUrl() + "/device/";
    // concatenate username and password with colon for authentication
    final String credentials = "owner" + ":" + password;
    authHeader = "Basic " + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);

    dialog = new ProgressDialog(aboutFragment.getActivity());
    dialog.setCancelable(false);
    dialog.setMessage("Please wait");
    dialog.setIndeterminate(true);
    dialog.show();

}

From source file:weavebytes.com.futureerp.activities.RegistrationActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_registration);

    register = (Button) findViewById(R.id.btnregister);
    edtname = (EditText) findViewById(R.id.edtusername);
    edtpass = (EditText) findViewById(R.id.edtpassword);
    edtmail = (EditText) findViewById(R.id.edtemail);
    progress = new ProgressDialog(RegistrationActivity.this);

    register.setOnClickListener(this);

}

From source file:eu.codeplumbers.cosi.api.tasks.DeleteFileTask.java

public DeleteFileTask(FileManagerFragment fileManagerFragment) {
    this.fileManagerFragment = fileManagerFragment;

    Device device = Device.registeredDevice();

    // delete all local notes
    new Delete().from(Note.class).execute();

    // cozy register device url
    this.url = device.getUrl() + "/ds-api/data/";

    // concatenate username and password with colon for authentication
    final String credentials = device.getLogin() + ":" + device.getPassword();
    authHeader = "Basic " + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);

    dialog = new ProgressDialog(fileManagerFragment.getActivity());
    dialog.setCancelable(false);/* ww  w.j a  v a 2 s . c  o  m*/
    dialog.setProgress(0);
    dialog.setMax(100);
    dialog.setMessage("Please wait");
    dialog.setIndeterminate(false);
    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    dialog.show();

}

From source file:eu.codeplumbers.cosi.api.tasks.SyncDocumentTask.java

public SyncDocumentTask(Activity activity) {
    this.activity = activity;
    result = "";//from   www  .  j  a  v a  2s .c  o  m

    Device device = Device.registeredDevice();

    // cozy register device url
    this.url = device.getUrl() + "/ds-api/data/";

    // concatenate username and password with colon for authentication
    final String credentials = device.getLogin() + ":" + device.getPassword();
    authHeader = "Basic " + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);

    dialog = new ProgressDialog(activity);
    dialog.setCancelable(false);
    dialog.setProgress(0);
    dialog.setMax(100);
    dialog.setMessage("Please wait");
    dialog.setIndeterminate(false);
    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    dialog.show();

}

From source file:cl.mmoscoso.geocomm.sync.GeoCommRegisterAsyncTask.java

public GeoCommRegisterAsyncTask(Context context, String hn, String name, String pass, String e_mail) {
    this.context = context;
    this.hostname = hn;
    this.pass = pass;
    this.name = name;
    this.e_mail = e_mail;
    this.mProgressDialog = new ProgressDialog(context);
    this.mProgressDialog.setMessage(this.context.getResources().getString(R.string.Loading));
    this.mProgressDialog.setIndeterminate(false);
    this.mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    this.mProgressDialog.setCancelable(true);
}