Check Connection before Synchronization

Before starting a synchronization, check the connection to the Unwired Server.

public static void Synchronize()
{
  if(CheckConnectionStates())
  {
    XXXDB.Synchronize();
  }

   // else notify user or show error message.
}