Testing for network connectivity in Mobile 5.0

Posted on Saturday 16 December 2006

A few people have mentioned to me that it's hard to tell if their credentials are wrong or if a network connection is not present when using GMobileSync. Version 1.1 does not check for network connectivity before trying to connect to Google Calendar. Version 1.2 does a quick check to make sure the device has a valid network connection before trying to synchronize. I found a reference showing how to do this in VB.NET on MSDN for Windows Mobile 2003. Since I'm targeting Mobile 5.0 users and using C#, I had to modify the code slightly.

Now, before any network activity, I check the IsConnected property. This will help with identifying error messages properly in GMobileSync.


Related Posts

1 Comment for 'Testing for network connectivity in Mobile 5.0'

  1.  
    January 20, 2007 | 2:08 pm
     

    […] With SmartPhones, there is not really consistent way to check for a present network connection. If you’re using a Mobile 5.0 PDA then it is very easy to check with this code. SmartPhones are different because they’re not online until they need to be online. […]

Leave a comment

(required)

(required)



Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.


RSS feed for comments on this post | TrackBack URI