Check Network Connectivity in Your Android App
MOst of the apps works on INternet. I want to check the Internet avaliabilty on the device . If Internet connection is not available the Error Message should be ... Check Internet Connection.
Please Help
Comments
The default is: "Web page not available .... The Web page at http://www........... might be temporarily down or it may have moved permanently to a new web address.
Here are some suggestions:
> Check to make sure that your device has a signal and data connection
> Reload this web page later.
< View a cached copy of the web page from Google. "
What supraweb is suggesting is it should be a simple " Check internet connection", Error message to alert the user that the web is not available due to a loss of connection.
Most professional apps display a customised error message that appears when this happens.
Error
{"CommentID":"","DraftID":"3339","MyDrafts":"My Drafts","CountDrafts":0,"FormSaved":true,"DeliveryType":"VIEW","Data":"PGRpdiBjbGFzcz0iTWVzc2FnZUZvcm0gQ29tbWVudEZvcm0iPgogICAgICA8ZGl2IGNsYXNzPSJUYWJzIENvbW1lbnRUYWJzIj4KICAgICAgPHVsPgogICAgICAgICA8bGkgY2xhc3M9IkFjdGl2ZSI+PGEgaHJlZj0iL3ZhbmlsbGEvcG9zdC9jb21tZW50LzEyNzIjIiBjbGFzcz0iV3JpdGVCdXR0b24gVGFiTGluayI+V3JpdGUgQ29tbWVudDwvYT48L2xpPgogICAgICAgICA8bGk+PGEgaHJlZj0iL3ZhbmlsbGEvcG9zdC9jb21tZW50LzEyNzIjIiBjbGFzcz0iUHJldmlld0J1dHRvbiBUYWJMaW5rIj5QcmV2aWV3PC9hPjwvbGk+CjxsaT48YSBocmVmPSIvdmFuaWxsYS9wb3N0L2NvbW1lbnQvMTI3MiMiIGNsYXNzPSJEcmFmdEJ1dHRvbiBUYWJMaW5rIj5TYXZlIERyYWZ0PC9hPjwvbGk+CiAgICAgIDwvdWw+CiAgIDwvZGl2PgogICA8Zm9ybSBpZD0iRm9ybV9Db21tZW50IiBtZXRob2Q9InBvc3QiIGFjdGlvbj0iL3ZhbmlsbGEvcG9zdC9jb21tZW50LzEyNzIiPgo8ZGl2Pgo8aW5wdXQgdHlwZT0iaGlkZGVuIiBpZD0iRm9ybV9UcmFuc2llbnRLZXkiIG5hbW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HQvamF2YXNjcmlwdCI+CiAgIGlmIChHZG5VcGxvYWRlcnMpCiAgICAgIEdkblVwbG9hZGVycy5QcmVwYXJlKCk7Cjwvc2NyaXB0PjxhIGhyZWY9Ii9kaXNjdXNzaW9ucyIgY2xhc3M9IkJhY2siPkJhY2sgdG8gRGlzY3Vzc2lvbnM8L2E+PGlucHV0IHR5cGU9InN1Ym1pdCIgaWQ9IkZvcm1fUG9zdENvbW1lbnQiIG5hbWU9IkNvbW1lbnQvUG9zdF9Db21tZW50IiB2YWx1ZT0iUG9zdCBDb21tZW50IiBjbGFzcz0iQnV0dG9uIENvbW1lbnRCdXR0b24iIC8+CjwvZGl2Pgo8L2Rpdj4KPC9mb3JtPjwvZGl2Pg==","InformMessages":[{"CssClass":"Dismissable AutoDismiss","Message":"Draft saved at 6:50PM"}],"ErrorMessages":"","RedirectUrl":""}