Checking for data connection
I have a button with an onclick event that opens another class. The other
class is making network calls to retrieve data and so if there is no
connection then the app force closes.
How would I implement a try catch or if statement that could check for the
data connection and if there isn't one, display a toast saying so. And if
there is then proceed to second class.
No comments:
Post a Comment