protected override void OnAppearing() { base.OnAppearing(); Debug.LogToFileMethod(); if (gpsProvider != null) { gpsProvider.SetListener(this); } }
protected override void OnAppearing() { base.OnAppearing(); Analytics.TrackPage(Analytics.PAGE_RUN); isRunning = true; // workaround for xamarin.com Bug 35407 - jobject muste not be IntPtr.Zero with Animation isLaunchDetected = false; isGpsOk = false; isUnitKmh = Settings.IsSpeedUnitKph(); settleCounter = SETTLE_COUNT_LIMIT; timeStampLastGps = DateTime.Now.Ticks; runAdjust = new RunAdjust(); runData = new RunData(runModeProvider.Mode); Debug.LogToFile(runModeProvider.ToString()); Device.StartTimer(TimeSpan.FromMilliseconds(SPEEDO_UPDATE_RATE_MS), OnTimer); gpsProvider.SetListener(this); accelerometerProvider.SetListener(this); }
protected override void OnAppearing() { base.OnAppearing(); Debug.LogToFileMethod(); Analytics.TrackPage(Analytics.PAGE_MAIN); InitState(); ApplyCalibration(false); // but do not log details to file if (gpsProvider != null) { gpsProvider.SetListener(this); } if (accelerometerProvider != null) { // register for launch detection event accelerometerProvider.SetListener(this); } isRunning = true; timeStampLastGps = DateTime.Now.Ticks; Device.StartTimer(TimeSpan.FromMilliseconds(CONDITION_UPDATE_RATE_MS), OnTimer); }