Windows phone 7 有关windows phone的信息(型号)
我想以编程方式了解设备型号,如“设置关于”页面中所示 我目前正在使用Windows phone 7 有关windows phone的信息(型号),windows-phone-7,windows-phone-8,windows-phone,Windows Phone 7,Windows Phone 8,Windows Phone,我想以编程方式了解设备型号,如“设置关于”页面中所示 我目前正在使用 Microsoft.Phone.Info.DeviceStatus.DeviceName 但是它没有帮助,并且给出了一些其他的典型值。 请帮助我如何获取上述电话型号/名称。您可以使用PhoneInfo中的扩展属性检索DeviceName,因此。测试并工作到今天;) 享受。您应该使用,一个简单的类,用于解析像 RM-885\u亚太地区\u中国\u 250 变成更友好的商业名称,比如 诺基亚Lumia 720 下面是一个示例代码
Microsoft.Phone.Info.DeviceStatus.DeviceName
但是它没有帮助,并且给出了一些其他的典型值。
请帮助我如何获取上述电话型号/名称。您可以使用PhoneInfo中的扩展属性检索DeviceName,因此。测试并工作到今天;) 享受。您应该使用,一个简单的类,用于解析像 RM-885\u亚太地区\u中国\u 250 变成更友好的商业名称,比如 诺基亚Lumia 720 下面是一个示例代码:
var phone = PhoneNameResolver.Resolve(
DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceName);
SomeTextBox.Text = phone.FullCanonicalName;
此博文中的更多信息:您可以使用以下功能:-
public static string getDeviceInfo(bool asList = false)
{
string r = "";
Geolocator locationservice = new Geolocator();
if (DeviceNetworkInformation.CellularMobileOperator != "") r += "CellularMobileOperator: " + DeviceNetworkInformation.CellularMobileOperator + Environment.NewLine;
r += "CellularDataEnabled: " + DeviceNetworkInformation.IsCellularDataEnabled + Environment.NewLine;
r += "WiFiEnabled: " + DeviceNetworkInformation.IsWiFiEnabled + Environment.NewLine;
r += "IsNetworkAvailable: " + DeviceNetworkInformation.IsNetworkAvailable + Environment.NewLine;
r += "Hardware Identifier: " + Convert.ToBase64String((byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId")) + Environment.NewLine;
r += "Location Services Permission: " + locationservice.LocationStatus + Environment.NewLine;
r += "Language: " + CultureInfo.CurrentCulture.EnglishName + Environment.NewLine;
r += "Locale: " + CultureInfo.CurrentCulture.Name + Environment.NewLine;
//r += "Background Service Enabled: " + ScheduledActionService.Find("PeriodicAgent").IsEnabled + Environment.NewLine;
r += "Runtime Version: " + Environment.Version + Environment.NewLine;
r += "Maximum Memory: " + (DeviceStatus.DeviceTotalMemory / (1024 * 1024)) + "M" + Environment.NewLine;
r += "Maximum Memory Available: " + (DeviceStatus.ApplicationMemoryUsageLimit / (1024 * 1024)) + "M" + Environment.NewLine;
r += "Peak Memory Use: " + (DeviceStatus.ApplicationPeakMemoryUsage / (1024 * 1024)) + "M" + Environment.NewLine;
r += "Charger: " + DeviceStatus.PowerSource + Environment.NewLine;
r += "DeviceFirmwareVersion: " + DeviceStatus.DeviceFirmwareVersion + Environment.NewLine;
r += "DeviceManufacturer: " + DeviceStatus.DeviceManufacturer + Environment.NewLine;
r += "OS Version: " + Environment.OSVersion + Environment.NewLine;
r += "User ID: " + settings[KeyString.USER_ID] + Environment.NewLine;
var phone = PhoneNameResolver.Resolve(DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceName);
r += "Phone model(userfriendly form):" +phone.FullCanonicalName ;
return r;
}
你在哪部手机上测试你的代码,从打给
DeviceStatus.DeviceName
或DeviceStatus.DeviceManufacturer
?我在测试Lumia 520和DeviceStatus.DeviceName时得到的值是多少?DeviceStatus.DeviceName给出的值与RM-914一样,DeviceStatus.DeviceManufacturer给出的值与诺基亚一样,但我解决了这一问题,使用的方法似乎与使用未弃用的DeviceStatus.DeviceName产生的变体名称(RM-914_im_india_389)相同。