Ejemplo n.º 1
0
        /// <summary>
        /// OSActivitySensor constructor.
        /// </summary
        public OSActivitySensor(ActivitySensor sensor)
        {
            _sensor = sensor;
            // Using this method to detect if the application runs in the emulator or on a real device. Later the *Simulator API is used to read fake sense data on emulator.
            // In production code you do not need this and in fact you should ensure that you do not include the Lumia.Sense.Test reference in your project.
            EasClientDeviceInformation x = new EasClientDeviceInformation();

            if (x.SystemProductName.StartsWith("Virtual"))
            {
                _runningInEmulator = true;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// OSActivitySensor constructor.
 /// </summary
 public OSActivitySensor(ActivitySensor sensor)
 {
     _sensor = sensor;
     // Using this method to detect if the application runs in the emulator or on a real device. Later the *Simulator API is used to read fake sense data on emulator. 
     // In production code you do not need this and in fact you should ensure that you do not include the Lumia.Sense.Test reference in your project.
     EasClientDeviceInformation x = new EasClientDeviceInformation();
     if (x.SystemProductName.StartsWith("Virtual"))
     {
         _runningInEmulator = true;
     }
 }