Example usage for android.app ProgressDialog show

List of usage examples for android.app ProgressDialog show

Introduction

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

Prototype

public static ProgressDialog show(Context context, CharSequence title, CharSequence message,
        boolean indeterminate) 

Source Link

Document

Creates and shows a ProgressDialog.

Usage

From source file:net.networksaremadeofstring.pulsant.portal.InvoiceLanding.java

public void onCreate(Bundle savedInstanceState) {
    API.SessionID = getIntent().getStringExtra("sessionid");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.invoicelanding);
    final ListView list = (ListView) findViewById(R.id.InvoiceList);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setTitle("Accounting");

    final ProgressDialog dialog = ProgressDialog.show(this, "Pulsant Portal", "Please wait: loading data....",
            true);// w ww .  j av  a 2 s.  c o m
    final Handler handler = new Handler() {
        public void handleMessage(Message msg) {
            dialog.dismiss();
            if (Success.equals("true")) {
                UpdateErrorMessage(ErrorMessage);
                InvoiceAdaptor adapter = new InvoiceAdaptor(InvoiceLanding.this, listOfInvoices, API.SessionID);
                list.setAdapter(adapter);
            } else {
                UpdateErrorMessage(ErrorMessage);
            }
        }
    };

    Thread dataPreload = new Thread() {
        public void run() {
            try {
                InvoiceAPIReturn = API.PortalQueryHack("invoices", "", "");
                Success = InvoiceAPIReturn.getString("success");
            } catch (JSONException e) {
                ErrorMessage = "An unrecoverable JSON Exception occured.";
                Success = "false";
            }

            if (Success.equals("false")) {
                Log.i("API", "Success was false");
                try {
                    ErrorMessage = InvoiceAPIReturn.getJSONObject("hackReturn").getString("msg");
                } catch (JSONException e) {
                    ErrorMessage = "A JSON parsing error prevented an exact error message to be determined.";
                }
            } else {
                int InvoiceCount = 0;
                Log.i("APIFuncs", InvoiceAPIReturn.toString());
                try {
                    Invoices = InvoiceAPIReturn.getJSONObject("hackReturn").getJSONArray("data");
                    InvoiceCount = Invoices.length();
                    ErrorMessage = "";
                } catch (JSONException e) {
                    ErrorMessage = "There don't appear to be any invoices for your account.....";
                    InvoiceCount = 0;
                    Log.e("API", "There was an eror parsing the array");
                    Log.e("API", e.getMessage());
                }

                //OK lets actually do something useful

                if (InvoiceCount == 0) {
                    Success = "false";
                    ErrorMessage = "There are no invoices for your account.";
                    handler.sendEmptyMessage(0);
                    return;
                }

                for (int i = 0; i < InvoiceCount; i++) {
                    JSONObject CurrentInvoice = null;
                    try {
                        CurrentInvoice = Invoices.getJSONObject(i);
                    } catch (JSONException e1) {
                        Log.e("APIFuncs", e1.getMessage());
                    }
                    try {
                        if (CurrentInvoice.getString("type").equals("invoice")) {
                            listOfInvoices.add(new Invoices(CurrentInvoice.getString("ref"),
                                    CurrentInvoice.getDouble("amount"), CurrentInvoice.getString("details"),
                                    CurrentInvoice.getString("date")));
                        } else {
                            Receipts.add(new Receipts(CurrentInvoice.getString("ref"),
                                    CurrentInvoice.getDouble("amount"), CurrentInvoice.getString("details"),
                                    CurrentInvoice.getString("date")));
                        }
                    } catch (JSONException e) {
                        Log.e("APIFuncs", e.getMessage());
                    }
                }
            }

            handler.sendEmptyMessage(0);
        }
    };

    dataPreload.start();
}

From source file:org.cinedroid.tasks.AbstractCineworldTask.java

@Override
protected void onPreExecute() {
    this.dialog = ProgressDialog.show(this.context, "", getTaskDetails(), false);
}

From source file:com.dedipower.portal.android.ManagedServerLanding.java

public void onCreate(Bundle savedInstanceState) {
    API.SessionID = getIntent().getStringExtra("sessionid");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.managedserverlanding);
    //temp/* w w  w.  jav  a2  s  .  c  o m*/
    list = (ListView) findViewById(R.id.ManagedServerList);
    final ProgressDialog dialog = ProgressDialog.show(this, "DediPortal", "Please wait: loading data....",
            true);
    final Handler handler = new Handler() {
        public void handleMessage(Message msg) {
            dialog.dismiss();
            if (Success.equals("true")) {
                UpdateErrorMessage(ErrorMessage);
                ManagedServerAdaptor adapter = new ManagedServerAdaptor(ManagedServerLanding.this,
                        listOfManagedServers, API.SessionID);
                list.setAdapter(adapter);
            } else {
                UpdateErrorMessage(ErrorMessage);
            }
        }
    };

    Thread dataPreload = new Thread() {
        int ServerCount = 0;

        public void run() {
            try {
                Servers = API.PortalQuery("servers", "none");
                Success = Servers.getString("success");
            } catch (JSONException e) {
                //UpdateErrorMessage("An unrecoverable JSON Exception occured.");
                ErrorMessage = "An unrecoverable JSON Exception occured.";
            }

            if (Success.equals("false")) {
                try {
                    //UpdateErrorMessage(Servers.getString("msg"));
                    ErrorMessage = Servers.getString("msg");
                } catch (JSONException e) {
                    //UpdateErrorMessage("An unrecoverable JSON Exception occured.");
                    ErrorMessage = "An unrecoverable JSON Exception occured.";
                }
            } else {
                Log.i("APIFuncs", Servers.toString());
                try {
                    ManagedServers = Servers.getJSONArray("servers");
                    //UpdateErrorMessage("");
                    ErrorMessage = "";
                } catch (JSONException e) {
                    //UpdateErrorMessage("There are no Managed servers in your account.");
                    ErrorMessage = "There are no Managed servers in your account.";
                }

                try {
                    ServerCount = ManagedServers.length();
                } catch (Exception e) {
                    ServerCount = 0;
                }

                if (ServerCount == 0) {
                    ErrorMessage = "There are no Managed servers for your account.";
                    handler.sendEmptyMessage(0);
                    return;
                }

                for (int i = 0; i < ServerCount; i++) {

                    try {
                        CurrentServer = ManagedServers.getJSONObject(i).getJSONObject("Server");
                    } catch (JSONException e1) {
                        Log.e("APIFuncs", e1.getMessage());
                    }

                    //Log.e("APIFuncs",CurrentServer.toString(3));
                    listOfManagedServers.add(new ManagedServer(GetString("ip"), GetString("servercode"),
                            GetString("description"), GetString("facility"), GetInt("bandwidth"),
                            GetString("bandwidthTotal"), GetBool("monitored"), GetInt("transferlimit"),
                            GetString("software"), GetString("state"), GetBool("managedbackupenabled")));
                }
            }
            handler.sendEmptyMessage(0);
        }
    };

    dataPreload.start();
    //temp
    /*try 
    {
      Servers = API.PortalQuery("servers", "none");
      Success = Servers.getString("success");
    } 
    catch (JSONException e) 
    {
       UpdateErrorMessage("An unrecoverable JSON Exception occured.");
    }
            
    if(Success == "false")
    {
       try 
       {
    UpdateErrorMessage(Servers.getString("msg"));
      } 
       catch (JSONException e) 
       {
     UpdateErrorMessage("An unrecoverable JSON Exception occured.");
      }
    }
    else
    {
       Log.i("APIFuncs",Servers.toString());
       try
        {
     ManagedServers = Servers.getJSONArray("servers");
      UpdateErrorMessage("");
        }
        catch (JSONException e) 
        {
      UpdateErrorMessage("There are no Managed servers in your account.");
        }
                
        //OK lets actually do something useful
        ListView list = (ListView)findViewById(R.id.ManagedServerList);
        List<ManagedServer> listOfManagedServers = new ArrayList<ManagedServer>();
        int ServerCount = ManagedServers.length();
        for(int i = 0; i < ServerCount; i++)
        {
              
    try 
    {
       CurrentServer = ManagedServers.getJSONObject(i).getJSONObject("Server");
    } 
    catch (JSONException e1) 
    {
       Log.e("APIFuncs",e1.getMessage());
    }
            
      //Log.e("APIFuncs",CurrentServer.toString(3));
      listOfManagedServers.add(new ManagedServer(GetString("ip"),
            GetString("servercode"),
            GetString("description"),
            GetString("facility"),
            GetInt("bandwidth"),
            GetString("bandwidthTotal"),
            GetBool("monitored"),
            GetInt("transferlimit"),
            GetString("software"),
            GetString("state"),
            GetBool("managedbackupenabled")));
        }
                
        ManagedServerAdaptor adapter = new ManagedServerAdaptor(this, listOfManagedServers, API.SessionID);
                
        list.setAdapter(adapter);
    }*/

}

From source file:com.hideous.backpack.BackpackAdapter.java

public BackpackAdapter(Context c) {
    mContext = c;//from   w w w  .  j a v a  2  s .co  m

    backpackActivity.numHats = 0;
    backpackActivity.numWeapons = 0;
    backpackActivity.numCraftables = 0;
    backpackActivity.numMisc = 0;
    loadingJson = ProgressDialog.show(c, "", "Loading backpack data...", true);
    new DownloadJSONTask().execute("ohshit");

}

From source file:com.dedipower.portal.android.ViewTicket.java

public void onCreate(Bundle savedInstanceState) {
    API.SessionID = getIntent().getStringExtra("sessionid");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.viewticket);
    list = (ListView) findViewById(R.id.TicketUpdatesList);

    final ProgressDialog dialog = ProgressDialog.show(this, "DediPortal", "Please wait: loading data....",
            true);/*from  www  .ja v  a  2s.c o m*/
    final Handler handler = new Handler() {
        public void handleMessage(Message msg) {
            dialog.dismiss();
            if (Success.equals("true")) {
                UpdateErrorMessage(ErrorMessage);
                TicketUpdatesAdaptor adapter = new TicketUpdatesAdaptor(ViewTicket.this, listOfUpdates,
                        API.SessionID);
                list.setAdapter(adapter);
            } else {
                UpdateErrorMessage(ErrorMessage);
            }
        }
    };

    Thread dataPreload = new Thread() {
        public void run() {
            try {
                TicketAPI = API.PortalQuery("updates", getIntent().getStringExtra("ticketID"));
                Success = TicketAPI.getString("success");
            } catch (JSONException e) {
                ErrorMessage = "An unrecoverable JSON Exception occured. Error Code: 1";
                Log.e("APIFuncs", e.getMessage());
            }

            if (Success == "false") {
                try {
                    Log.i("APIFuncs", TicketAPI.toString(3));
                    ErrorMessage = TicketAPI.getString("msg");
                } catch (JSONException e) {
                    Log.e("APIFuncs", e.getMessage());
                }
            } else {
                Log.i("APIFuncs", TicketAPI.toString());
                try {
                    Updates = TicketAPI.getJSONArray("updates");
                    ErrorMessage = "";
                } catch (JSONException e) {
                    ErrorMessage = "There are no updates for this ticket. (Strange!)";
                }

                int TicketCount = Updates.length();

                if (TicketCount == 0) {
                    ErrorMessage = "There are no updates for this ticket.";
                    return;
                }

                for (int i = 0; i < TicketCount; i++) {
                    try {
                        CurrentTicket = Updates.getJSONObject(i);

                    } catch (JSONException e1) {
                        Log.e("APIFuncs", e1.getMessage());
                    }

                    if (CurrentTicket != null) {
                        listOfUpdates.add(new TicketUpdates(GetString("type"), GetString("name"),
                                GetInt("time"), GetString("content")));
                    }
                }
                handler.sendEmptyMessage(0);
            }

        }
    };

    dataPreload.start();

    Button AddReply = (Button) findViewById(R.id.AddReplyButton);
    AddReply.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            Intent CreateTicketReplyIntent = new Intent(ViewTicket.this, AddTicketReply.class);
            CreateTicketReplyIntent.putExtra("sessionid", API.SessionID);
            CreateTicketReplyIntent.putExtra("ticketid", getIntent().getStringExtra("ticketID"));
            ViewTicket.this.startActivity(CreateTicketReplyIntent);
        }
    });

    /*
    try 
    {
       TicketAPI = API.PortalQuery("updates", getIntent().getStringExtra("ticketID"));
      Success = TicketAPI.getString("success");   
    } 
    catch (JSONException e) 
    {
       UpdateErrorMessage("An unrecoverable JSON Exception occured. Error Code: 1");
       Log.e("APIFuncs",e.getMessage());
       //Toast.makeText(ColoLanding.this, "An unrecoverable JSON Exception occured.", Toast.LENGTH_LONG).show();
    }
            
    if(Success == "false")
    {
       try 
       {
     Log.i("APIFuncs",TicketAPI.toString(3));
    UpdateErrorMessage(TicketAPI.getString("msg"));
      } 
       catch (JSONException e) 
       {
     Log.e("APIFuncs",e.getMessage());
     UpdateErrorMessage("An unrecoverable JSON Exception occured.  Error Code: 2");
      }
    }
    else
    {
       Log.i("APIFuncs",TicketAPI.toString());
       try
        {
     Updates = TicketAPI.getJSONArray("updates");
      UpdateErrorMessage("");
        }
        catch (JSONException e) 
        {
      UpdateErrorMessage("There are no updates for this ticket. (Strange!)");
        }
                
        //OK lets actually do something useful
        List<TicketUpdates> listOfUpdates = new ArrayList<TicketUpdates>();
        int TicketCount = Updates.length();
                
        if(TicketCount == 0)
        {
      UpdateErrorMessage("There are no updates for this ticket.");
      return;
        }
                
        for(int i = 0; i < TicketCount; i++)
        {
    try 
    {
       CurrentTicket = Updates.getJSONObject(i);
            
    } 
    catch (JSONException e1) 
    {
       Log.e("APIFuncs",e1.getMessage());
    }
            
    if(CurrentTicket != null)
    {
       listOfUpdates.add(new TicketUpdates(GetString("type"),
            GetString("name"), 
            GetInt("time"), 
            GetString("content")));
    }
        }
        TicketUpdatesAdaptor adapter = new TicketUpdatesAdaptor(this, listOfUpdates, API.SessionID);
                
        list.setAdapter(adapter);
    }*/
}

From source file:net.networksaremadeofstring.pulsant.portal.ViewTicket.java

public void onCreate(Bundle savedInstanceState) {
    API.SessionID = getIntent().getStringExtra("sessionid");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.viewticket);
    list = (ListView) findViewById(R.id.TicketUpdatesList);

    final ProgressDialog dialog = ProgressDialog.show(this, "Pulsant Portal", "Please wait: loading data....",
            true);//  ww w . j  a v  a2 s  .co m
    final Handler handler = new Handler() {
        public void handleMessage(Message msg) {
            dialog.dismiss();
            if (Success.equals("true")) {
                UpdateErrorMessage(ErrorMessage);
                TicketUpdatesAdaptor adapter = new TicketUpdatesAdaptor(ViewTicket.this, listOfUpdates,
                        API.SessionID);
                list.setAdapter(adapter);
            } else {
                UpdateErrorMessage(ErrorMessage);
            }
        }
    };

    Thread dataPreload = new Thread() {
        public void run() {
            try {
                TicketAPI = API.PortalQuery("updates", getIntent().getStringExtra("ticketID"));
                Success = TicketAPI.getString("success");
            } catch (JSONException e) {
                ErrorMessage = "An unrecoverable JSON Exception occured. Error Code: 1";
                Log.e("APIFuncs", e.getMessage());
            }

            if (Success.equals("false")) {
                try {
                    Log.i("APIFuncs", TicketAPI.toString(3));
                    ErrorMessage = TicketAPI.getString("msg");
                } catch (JSONException e) {
                    ErrorMessage = e.getMessage();
                    Log.e("APIFuncs", e.getMessage());
                }
                handler.sendEmptyMessage(0);
            } else {
                Log.i("APIFuncs", TicketAPI.toString());
                try {
                    Updates = TicketAPI.getJSONArray("updates");
                    ErrorMessage = "";
                } catch (JSONException e) {
                    ErrorMessage = "There are no updates for this ticket. (Strange!)";
                }

                int TicketCount = Updates.length();

                if (TicketCount == 0) {
                    ErrorMessage = "There are no updates for this ticket.";
                    return;
                }

                for (int i = 0; i < TicketCount; i++) {
                    try {
                        CurrentTicket = Updates.getJSONObject(i);

                    } catch (JSONException e1) {
                        Log.e("APIFuncs", e1.getMessage());
                    }

                    if (CurrentTicket != null) {
                        listOfUpdates.add(new TicketUpdates(GetString("type"), GetString("name"),
                                GetInt("time"), GetString("content")));
                    }
                }
                handler.sendEmptyMessage(0);
            }

        }
    };

    dataPreload.start();

    Button AddReply = (Button) findViewById(R.id.AddReplyButton);
    AddReply.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            Intent CreateTicketReplyIntent = new Intent(ViewTicket.this, AddTicketReply.class);
            CreateTicketReplyIntent.putExtra("sessionid", API.SessionID);
            CreateTicketReplyIntent.putExtra("ticketid", getIntent().getStringExtra("ticketID"));
            ViewTicket.this.startActivity(CreateTicketReplyIntent);
        }
    });

    /*
    try 
    {
       TicketAPI = API.PortalQuery("updates", getIntent().getStringExtra("ticketID"));
      Success = TicketAPI.getString("success");   
    } 
    catch (JSONException e) 
    {
       UpdateErrorMessage("An unrecoverable JSON Exception occured. Error Code: 1");
       Log.e("APIFuncs",e.getMessage());
       //Toast.makeText(ColoLanding.this, "An unrecoverable JSON Exception occured.", Toast.LENGTH_LONG).show();
    }
            
    if(Success == "false")
    {
       try 
       {
     Log.i("APIFuncs",TicketAPI.toString(3));
    UpdateErrorMessage(TicketAPI.getString("msg"));
      } 
       catch (JSONException e) 
       {
     Log.e("APIFuncs",e.getMessage());
     UpdateErrorMessage("An unrecoverable JSON Exception occured.  Error Code: 2");
      }
    }
    else
    {
       Log.i("APIFuncs",TicketAPI.toString());
       try
        {
     Updates = TicketAPI.getJSONArray("updates");
      UpdateErrorMessage("");
        }
        catch (JSONException e) 
        {
      UpdateErrorMessage("There are no updates for this ticket. (Strange!)");
        }
                
        //OK lets actually do something useful
        List<TicketUpdates> listOfUpdates = new ArrayList<TicketUpdates>();
        int TicketCount = Updates.length();
                
        if(TicketCount == 0)
        {
      UpdateErrorMessage("There are no updates for this ticket.");
      return;
        }
                
        for(int i = 0; i < TicketCount; i++)
        {
    try 
    {
       CurrentTicket = Updates.getJSONObject(i);
            
    } 
    catch (JSONException e1) 
    {
       Log.e("APIFuncs",e1.getMessage());
    }
            
    if(CurrentTicket != null)
    {
       listOfUpdates.add(new TicketUpdates(GetString("type"),
            GetString("name"), 
            GetInt("time"), 
            GetString("content")));
    }
        }
        TicketUpdatesAdaptor adapter = new TicketUpdatesAdaptor(this, listOfUpdates, API.SessionID);
                
        list.setAdapter(adapter);
    }*/
}

From source file:de.incoherent.suseconferenceclient.tasks.CheckForUpdatesTask.java

public CheckForUpdatesTask(Context context, Conference conference, CheckForUpdatesListener listener) {
    this.mContext = context;
    this.mConference = conference;
    this.mListener = listener;
    this.mDb = SUSEConferences.getDatabase();
    mDialog = ProgressDialog.show(context, "", "Checking for schedule updates...", true);
}

From source file:edu.usf.cutr.opentripplanner.android.tasks.MetadataRequest.java

protected void onPreExecute() {
    if (activity.get() != null) {
        progressDialog.setIndeterminate(true);
        progressDialog.setCancelable(true);
        Activity activityRetrieved = activity.get();
        if (activityRetrieved != null) {
            progressDialog = ProgressDialog.show(activityRetrieved, "",
                    context.getResources().getString(R.string.task_progress_metadata_progress), true);
        }//from w  w w.  j av  a  2 s  . c o  m
    }
}

From source file:org.liberty.android.fantastischmemo.utils.AMGUIUtility.java

public static void doProgressTask(final Activity activity, final String progressTitle,
        final String progressMessage, final ProgressTask task) {
    final ProgressDialog mProgressDialog = ProgressDialog.show(activity, progressTitle, progressMessage, true);
    final Handler handler = new Handler();
    new Thread() {
        public void run() {
            try {
                task.doHeavyTask();//from   ww w .ja v  a2  s.  co m
                handler.post(new Runnable() {
                    public void run() {
                        task.doUITask();
                        mProgressDialog.dismiss();
                    }
                });
            } catch (final Exception e) {
                handler.post(new Runnable() {
                    public void run() {
                        mProgressDialog.dismiss();
                        displayException(activity, activity.getString(R.string.exception_text),
                                activity.getString(R.string.exception_message), e);
                        Log.e(TAG, "Error running progress task", e);
                    }
                });
            }
        }
    }.start();
}

From source file:net.networksaremadeofstring.pulsant.portal.ManagedServerLanding.java

public void onCreate(Bundle savedInstanceState) {
    API.SessionID = getIntent().getStringExtra("sessionid");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.managedserverlanding);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setTitle("Managed Servers");

    //temp//w  w  w.ja  v  a 2  s  . co m
    list = (ListView) findViewById(R.id.ManagedServerList);
    final ProgressDialog dialog = ProgressDialog.show(this, "Pulsant Portal", "Please wait: loading data....",
            true);
    final Handler handler = new Handler() {
        public void handleMessage(Message msg) {
            dialog.dismiss();
            if (Success.equals("true")) {
                UpdateErrorMessage(ErrorMessage);

                ManagedServerAdaptor adapter = new ManagedServerAdaptor(ManagedServerLanding.this,
                        listOfManagedServers, API.SessionID);
                list.setAdapter(adapter);
                /*list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
                list.setOnLongClickListener(new View.OnLongClickListener() {
                 public boolean onLongClick(View view) 
                 {
                if (mActionMode != null) 
                {
                   Log.i("onLongClick","Nuhuh");
                    return false;
                }
                        
                // Start the CAB using the ActionMode.Callback defined above
                mActionMode = startActionMode(mActionModeCallback);
                view.setSelected(true);
                return true;
                  }
                        
                });*/
            } else {
                UpdateErrorMessage(ErrorMessage);
            }
        }
    };

    Thread dataPreload = new Thread() {
        int ServerCount = 0;

        public void run() {
            try {
                Servers = API.PortalQuery("servers", "none");
                Success = Servers.getString("success");
            } catch (JSONException e) {
                //UpdateErrorMessage("An unrecoverable JSON Exception occured.");
                ErrorMessage = "An unrecoverable JSON Exception occured.";
            }

            if (Success.equals("false")) {
                try {
                    //UpdateErrorMessage(Servers.getString("msg"));
                    ErrorMessage = Servers.getString("msg");
                } catch (JSONException e) {
                    //UpdateErrorMessage("An unrecoverable JSON Exception occured.");
                    ErrorMessage = "An unrecoverable JSON Exception occured.";
                }
            } else {
                Log.i("APIFuncs", Servers.toString());
                try {
                    ManagedServers = Servers.getJSONArray("servers");
                    //UpdateErrorMessage("");
                    ErrorMessage = "";
                } catch (JSONException e) {
                    //UpdateErrorMessage("There are no Managed servers in your account.");
                    ErrorMessage = "There are no Managed servers in your account.";
                }

                try {
                    ServerCount = ManagedServers.length();
                } catch (Exception e) {
                    ServerCount = 0;
                }

                if (ServerCount == 0) {
                    ErrorMessage = "There are no Managed servers for your account.";
                    handler.sendEmptyMessage(0);
                    return;
                }

                for (int i = 0; i < ServerCount; i++) {

                    try {
                        CurrentServer = ManagedServers.getJSONObject(i).getJSONObject("Server");
                    } catch (JSONException e1) {
                        Log.e("APIFuncs", e1.getMessage());
                    }

                    //Log.e("APIFuncs",CurrentServer.toString(3));
                    listOfManagedServers.add(new ManagedServer(GetString("ip"), GetString("servercode"),
                            GetString("description"), GetString("facility"), GetInt("bandwidth"),
                            GetString("bandwidthTotal"), GetBool("monitored"), GetInt("transferlimit"),
                            GetString("software"), GetString("state"), GetBool("managedbackupenabled")));
                }
            }
            handler.sendEmptyMessage(0);
        }
    };

    dataPreload.start();

}