I am trying to display a dialog in a non-Activity class. Basically, I detect an object in my app, I would like to display a dialog and then switch activities. I\'m getting a \"j
You do this
context.runOnUIThread( new Runnable() {
public void run() {
// show the Dialog
mDialog.setTitle("Please wait");
mDialog.setMessage("Please wait");
mDialog.show();
}
});
}
Thread.sleep(5000);
context.runOnUIThread( new Runnable() {
public void run() {
// Dismiss the Dialog
mDialog.dismiss();
}
});