/// <summary> /// Prevents a default instance of the <see cref="AndroidDevice"/> class from being created. /// </summary> private AndroidDevice() { var manager = Services.PhoneService.Manager; if (manager != null && manager.PhoneType != PhoneType.None) { this.PhoneService = new PhoneService(); } if (Device.Accelerometer.IsSupported) { Accelerometer = new Accelerometer(); } if (Device.Gyroscope.IsSupported) { Gyroscope = new Gyroscope(); } if (Services.Media.Microphone.IsEnabled) { Microphone = new Microphone(); } this.Display = new Display(); this.Manufacturer = Build.Manufacturer; this.Name = Build.Model; this.HardwareVersion = Build.Hardware; this.FirmwareVersion = Build.VERSION.Release; this.Battery = new Battery(); this.MediaPicker = new MediaPicker(); this.Network = new Network(); }