Example #1
0
 private async void OnLocationUpdates(object sender, Location location)
 {
     //Hover on customized "CompareTo" to see how two locations compared.
     if ((MyLocation == null) || (MyLocation.CompareTo(location) != 0))
     {
         Device.BeginInvokeOnMainThread(() =>
         {
             MyLocation = location;
         });
         if (ServerCommunicator.Instance.GroupID != null)
         {
             //TODO: why SendLocationAsync(MyLocation) throwing exception
             await ServerCommunicator.Instance.SendLocationAsync(location);
         }
     }
 }