my app sends a POST request to a server and gets a response using JSON format.
Sometimes my JSON response is "null" (if the request goes in time out). In that case I need to notify the user about the timeout (dialog or toast) and avoid the app to crash.
How do I handle correctly the JSONException and avoid the app crash?
Thank you! Marco