I had developed a small application which is running fine while having internet connection. But crashes when lost internet connection. I had implemented
- Asynctask to fetch information from server and to display
- Service which continuously monitor for the new message and gives notification if it found a new one. It run for every minute.
- Declared min-sdk and target-sdk to 8 in the Manifest file.
Can anyone help me out of this ?? I am not getting an issue weather its an AsyncTask or API level.
use try and catch to handle the exception like this: