• Post Reply Bookmark Topic Watch Topic
  • New Topic

Internet Connectivity Check - Crafting the silver bullet.  RSS feed

Ranch Hand
Posts: 69
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all, back again with another review request. As the topic subject states, I am looking into making the most bullet-proof utility function to check for internet connectivity. Here's a link to the code: https://github.com/LukeLeber/AndroidFramework/blob/master/support/src/main/java/com/lukeleber/network/Connectivity.java

Thus far it seems to work well, but there are always new and exciting ways for software to fail. One area that I am a little concerned about is if a device has an invalid date/time and gets a SSL related exception. What would be the best way to go about differentiating the "glob" of IOException derivations that might arise from the call to HttpURLConnection.connect (which all do not necessarily mean that a connection could not be made)? Should the individual exception cases be treated as implementation defined, or is there documentation available anywhere that is more detailed than the JDK docs?

Please be as blunt and merciless as possible in your review.


PS. In other news, Scandroid has had a GUI face-lift. Custom service facet wrappers have been made to more intuitively display the data stream(s).

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!