I have a backup routine that copies everything from one folder to an external SD card which works perfectly. I\'m trying to get an nice popup dialog box that shows when it\'
Create a asyntask and put your time consuming tasks
public void doBackup(View view) throws IOException{
ProgressDialog pd = new ProgressDialog(this);
pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);
pd.setMessage("Running backup. Do not unplug drive");
pd.setIndeterminate(true);
pd.setCancelable(false);
pd.show();
//create asyntask here
//Put below code in doInBackground mathod
File source = new File("/mnt/extSdCard/DirectEnquiries");
File dest = new File("/mnt/UsbDriveA/Backup");
copyDirectory(source, dest);
//put this code in onPostExecute Method.
pd.dismiss();
}
You will get number of samples of Asyntask.