/// </summary>
public class GpsSatellite
{
- private int _interval = 120;
+ private int _interval = 1;
private Locator _locator;
private EventHandler<SatelliteStatusChangedEventArgs> _satelliteStatusChanged;
private IntPtr _handle = IntPtr.Zero;
}
remove
{
- Log.Info(Globals.LogTag, "SatelliteStatusUpdated remoove called");
+ Log.Info(Globals.LogTag, "SatelliteStatusUpdated Remove called");
_satelliteStatusChanged -= value;
if (_satelliteStatusChanged == null)
{
Log.Info(Globals.LogTag, "SetSatelliteStatusChangeCallback");
GCHandle handle = GCHandle.Alloc(this);
int ret = Interop.GpsSatellite.SetSatelliteStatusChangedCallback(_handle, SatelliteStatusChangedCallback, _interval, GCHandle.ToIntPtr(handle));
+ /* int ret = Interop.GpsSatellite.SetSatelliteStatusChangedCallback(_handle, SatelliteStatusChangedCallback, _interval, IntPtr.Zero); */
if (((LocationError)ret != LocationError.None))
{
Log.Error(Globals.LogTag, "Error in setting satellite status changed callback," + (LocationError)ret);
if (_disposed)
return;
- DestroyHandle();
+ if (disposing)
+ DestroyHandle();
+
_disposed = true;
}
private void DestroyHandle()
{
- Log.Info(Globals.LogTag, "DestroyHandle");
+ Log.Info(Globals.LogTag, "DestroyBoundaryHandle");
int ret = Interop.LocationBoundary.DestroyBoundary(handle);
if (((LocationError)ret != LocationError.None))
{