I have an AlertDialog, and it has a button that, if selected, initiates sending the file to the remote server as follows:
builder.setMessage(text) .setCancelable(false) .setPositiveButton("Yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { uploadFile(); }})
This works great, the only problem is that uploadFile () can potentially last a long time (from 30 seconds to 2 minutes). I would like to replace AlertDialog with a progress dialog (even vague), but I donβt see how to start one dialog from another?
Can someone offer some advice on how I could do this.
Thanks Jarabek
android task alertdialog
jarabek
source share