protected override void OnAppearing () { gps = new Gps (); gps.Geolocator.PositionError += OnListeningError; gps.Geolocator.PositionChanged += OnPositionChanged; base.OnAppearing (); }
protected override void OnDisappearing () { gps.Geolocator.PositionError -= OnListeningError; gps.Geolocator.PositionChanged -= OnPositionChanged; gps = null; base.OnDisappearing (); }
protected override async void OnAppearing(){ gps = new Gps (); gps.Geolocator.PositionError += OnListeningError; gps.Geolocator.PositionChanged += OnPositionChanged; _linkedGpsPositions = await RestAPI.GetGpsPositionsWithProjects (); base.OnAppearing (); }