开发者

Android: Internet Accessing Application

开发者 https://www.devze.com 2023-01-15 03:13 出处:网络
I am making an application that fetches data from internet like web service,so it requires internet connection.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消