/// <summary>
        /// Initalizes PedometerService class instance
        /// </summary>
        private PedometerService()
        {
            pedometer = new Tizen.Sensor.Pedometer
            {
                Interval = 50,
            };

            pedometer.DataUpdated += Pedometer_DataUpdated;
            pedometer.Start();
            PedometerUpdated?.Invoke(this, new PedometerUpdatedEventArgs((int)pedometer.CalorieBurned, (int)pedometer.StepCount, (int)pedometer.LastSpeed, (int)pedometer.MovingDistance));

            var appTerminatedService = AppTerminatedService.Instance;

            appTerminatedService.Terminated += AppTerminatedService_Terminated;
        }
Beispiel #2
0
 private Pedometer(Tizen.Sensor.Pedometer pedometer)
 {
     _pedometer = pedometer;
 }