public static string GetDeviceName() { var deviceName = DeviceStatus.DeviceName; var deviceId = DeviceStatus.DeviceManufacturer; var phone = PhoneNameResolver.Resolve(deviceId, deviceName); var deviceInfo = string.Format("{0} ({1})", phone.CanonicalModel, phone.CanonicalManufacturer); return(deviceInfo); }
public void SetDeviceInfo() { var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation(); DeviceName = deviceInfo.FriendlyName; DeviceModel = PhoneNameResolver.Resolve(deviceInfo.SystemManufacturer, deviceInfo.SystemProductName).FullCanonicalName; CreationDate = DateTime.Now; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel( INavigationService navigationService, IAuthenticationService authenticationService, ICacheService cacheService, IReaderHelper readerHelper, PocketViewModel pocketViewModel, ReadabilityViewModel readabilityViewModel) { _navigationService = navigationService; _authenticationService = authenticationService; _cacheService = cacheService; _readerHelper = readerHelper; _pocketViewModel = pocketViewModel; _readabilityViewModel = readabilityViewModel; #if WINDOWS_PHONE_APP var deviceInfo = new EasClientDeviceInformation(); var phone = PhoneNameResolver.Resolve(deviceInfo.SystemManufacturer, deviceInfo.SystemProductName); DeviceName = $"{deviceInfo.FriendlyName} ({phone.CanonicalModel})"; #endif }