Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
 /// <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();
 }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
 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");
 }
Exemplo n.º 6
0
 public CoreDelegateServices(INotificationManager notifications, IPedometer pedometer)
 {
     this.Pedometer     = pedometer;
     this.Notifications = notifications;
 }