Android Open Source - isidore Load Droplets Async

From Project

Back to project page isidore.


The source code is released under:

GNU General Public License

If you think the Android project isidore listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.tbardici.isidore;
//from w ww .  java 2 s . c  o m
import org.json.JSONException;
import org.json.JSONObject;

import com.tbardici.isidore.droplet.MyDroplets;

import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;

 * @author Teo
public class LoadDropletsAsync extends AsyncTask<Void, String, Void>{

  private Context context;
  private ProgressDialog dialog;
  public LoadDropletsAsync(Context ctx){
    this.context = ctx;
    this.dialog = new ProgressDialog(this.context);
  protected void onPreExecute() {
    this.dialog.setTitle("Please wait.");
    this.dialog.setMessage("Loading droplets...");;
  protected void onPostExecute(Void result) {
    Intent intent1 = new Intent(this.context, ItemListActivity.class);
  protected Void doInBackground(Void... unused) {
    try {
      String url;
        JSONObject response;
          //get all the sizes and initialize our DropletType collection
          url = DOApi.getUrl(DOApi.API.DROPLETS_GET_ALL,  null);
      response = DOApi.callApi(url);
    } catch (JSONException e) {
      // TODO Auto-generated catch block
    return null;
  protected void onProgressUpdate(String... values) {


Java Source Code List