0

I developed an application for android tablets. In that application, when I get into the app and after doing some actions I keep the application idle for half an hour or sometimes and again get back into the app to perform any action, it leads to application crash with UNKNOWNHOSTEXCEPTION.I don't know why it happens even after i gave INTERNET permission in Android manifest file.I have been searching solution for this problem for one week...still i could not able to find any solution.i used fragments in my application...please help me...

2
  • 2
    POst your code and the request you are sending. Throw more light on the question. Commented Oct 3, 2012 at 10:58
  • 1
    Easy fix: Use try/catch -statement and catch the exception to prevent it from crashing your whole application. Commented Oct 3, 2012 at 11:05

2 Answers 2

1

Likely the tablet temporary switching off the network to save energy. Add try/catch to your requests and probably do 2-3 tries in some interval before you will show error to user.

Sign up to request clarification or add additional context in comments.

Comments

0

This type of exception happens when you try to switch networks , or the required Network isn't available.

Use try/catch block to prevent crashing of application.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.