Step #7: Trying It Out
To see this dialog in action:
- Run the revised app
- Choose Settings from the overflow menu and edit the Web service URL to something that is invalid (e.g., add an
x
on the end) - Choose Import from the overflow menu
At this point, you should get our AlertDialog
:
If you click “Retry”, you will get the dialog again right away, as nothing has changed about our error conditions — we still have the incorrect URL.
If you click “Cancel” and revert the change to the URL that you introduced, then import again, it should succeed and you should not see the dialog.
We are going to be importing to-do items some more in the next tutorial, so if you did modify the URL, be sure to change it back to a valid value before continuing.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.