protected override void OnAppearing()
        {
            base.OnAppearing();

            if (Device.OS != TargetPlatform.Android)
            {
                locationTracker.StartTracking();
            }
        }
Exemplo n.º 2
0
        public WhereAmIPage()
        {
            InitializeComponent();

            ILocationTracker locationTracker = DependencyService.Get <ILocationTracker>();

            locationTracker.LocationChanged += OnLocationTrackerLocationChanged;
            locationTracker.StartTracking();
        }
Exemplo n.º 3
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            if (Device.RuntimePlatform != Device.Android)
            {
                locationTracker.StartTracking();
            }
        }
Exemplo n.º 4
0
        void init()
        {
            order      = new OrderRequest();
            MyLocation = "No Data";
            _locationTracker.LocationChanged += onLocationChanged;
            _locationTracker.StartTracking();

            timer = new Timer(async(a) => {
                //	Debug.WriteLine("Tick");
                if (lastProcessedPosition != null && lastProcessedPosition == lastPosition)
                {
                    return;
                }

                if (lastPosition == null)
                {
                    return;
                }

                lastProcessedPosition = lastPosition;
                await processPosition(lastProcessedPosition);
            }, null, 500, 500);
        }
Exemplo n.º 5
0
 protected override void OnAppearing()
 {
     base.OnAppearing();
     locationTracker.StartTracking();
 }