Android: Internet Accessing Application
I am making an application that fetches data from internet like web service,so it requires internet connection.
So when i first click on my application, If internet connection is not available it should show me dialog that Internet connection not available get it connected.And if connection is available then it should be able to work fetch data fr开发者_如何学Goom internet.
Can anybody guide me how to check if internet connection is available or not?
Simply making a request for something like google.com would let you know that you have an internet connection. The first thing you need to make sure that you have done is to request internet access via your manifest. See these two pages:
http://developer.android.com/guide/topics/security/security.html
http://developer.android.com/reference/android/Manifest.permission.html#INTERNET
精彩评论