本文介绍了使用诺基亚音乐api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用诺基亚音乐API制作了一个应用程序,它使我的应用程序不被认证。问题是诺基亚音乐仅适用于诺基亚手机,因此在htc设备上失败了。如何找到设备信息以便我可以避免意外终止
并且可以显示用户友好的消息?
I made an app using nokia music api and it made my app not to be certified. The problem is that nokia music is served only for nokia phones and hence it failed on an htc device. How can i find the device information so i can avoid unexpected termination and may be can display a user friendly message?
推荐答案
根据制造商名称,您可以执行所需的功能。
Based on the manufacturer name you can execute the required fuctionality.
private void button1_Click(object sender, RoutedEventArgs e){ string modelname = null; object modelobject = null; if (Microsoft.Phone.Info.DeviceExtendedProperties.TryGetValue("DeviceName", out modelobject)) modelname = modelobject as string; string ManufacturerName=""; object manufacturerobject; if (DeviceExtendedProperties.TryGetValue("DeviceManufacturer", out manufacturerobject)) ManufacturerName = manufacturerobject.ToString(); MessageBox.Show("Device Name = " + modelname + " Manufacturer = " + ManufacturerName );}
这篇关于使用诺基亚音乐api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!