0

A lot of topics about how to check internet connecton use getActiveNetworkInfo() but the documentation and my experience tell me that it only check network connection. Am I correct?

So to test internet connection what are the best method? requestRouteToHost() being the host a internet host?

metRo_
  • 415
  • 1
  • 5
  • 16
  • it does check internet connection too. – Marko Niciforovic Mar 28 '13 at 15:02
  • Are you sure? Because if I disconnect my router from the internet the device still says that there is internet :s – metRo_ Mar 28 '13 at 15:04
  • mm, read this question, answer from binnyb seems correct.http://stackoverflow.com/questions/5474089/how-to-check-currently-internet-connection-is-available-or-not-in-android – Marko Niciforovic Mar 28 '13 at 15:06
  • I'm using the same code and if I remove the adsl cable from the router it still say the device is connect and only when I turn off the router it says there are no network connected. – metRo_ Mar 28 '13 at 15:29

1 Answers1

0

getActiveNetworkInfo() only refers to direct networks connection (Ethernet, wifi,...) for check if you have internet I usually try to reach www.google.com for example or other web or my own server.

taquionbcn
  • 492
  • 6
  • 22