public MainViewModel(IAccelerometer accelerometer = null, IGyroscope gyroscope = null, IMagnetometer magnetometer = null, ICompass compass = null, IAmbientLight ambientLight = null, IBarometer barometer = null, IPedometer pedometer = null, IProximity proximity = null, IHeartRateMonitor heartRate = null, IHumidity humidity = null, ITemperature temperature = null) { this.Sensors = new List <ISensorViewModel>(); this.AddIf(accelerometer, "G"); this.AddIf(gyroscope, "G"); this.AddIf(magnetometer, "M"); this.AddIf(compass, "D"); this.AddIf(ambientLight, "Light"); this.AddIf(barometer, "Pressure"); this.AddIf(pedometer, "Steps"); this.AddIf(proximity, "Near"); this.AddIf(heartRate, "Heart Rate (bpm)"); this.AddIf(humidity, "Humidity"); this.AddIf(temperature, "Temp"); }
/// <summary> /// Release Pedometer and all of its resources /// </summary> public static void Release() { if (_Implementation == null) { return; } // Release and dereference _Implementation.Release(); _Implementation = null; }
static Pedometer() { // Create implementation for this platform Implementation = #if UNITY_ANDROID && !UNITY_EDITOR new PedometerAndroid(); #else null; #endif PedometerUtility.Initialize(); }
static Pedometer() { // Create implementation for this platform Implementation = new PedometerAndroid(); /* #if UNITY_IOS && !UNITY_EDITOR * new PedometeriOS(); #elif UNITY_ANDROID && !UNITY_EDITOR * new PedometerAndroid(); #else * null; #endif */ PedometerUtility.Initialize(); }
public MainViewModel(IAccelerometer accelerometer = null, IGyroscope gyroscope = null, IMagnetometer magnetometer = null, ICompass compass = null, IAmbientLight ambientLight = null, IBarometer barometer = null, IPedometer pedometer = null, IProximity proximity = null) { this.Sensors = new List <ISensorViewModel>(); this.AddIf(accelerometer, "G"); this.AddIf(gyroscope, "G"); this.AddIf(magnetometer, "M"); this.AddIf(compass, "D"); this.AddIf(ambientLight, "Light"); this.AddIf(barometer, "Pressure"); this.AddIf(pedometer, "Steps"); this.AddIf(proximity, "Near"); }
public CoreDelegateServices(INotificationManager notifications, IPedometer pedometer) { this.Pedometer = pedometer; this.Notifications = notifications; }