API to get the friendly name of your Windows Phone 8 device?

3k views Asked by At

Is there a way to get the name of your phone? The name you see in Windows Explorer properties as the device name?

I have looked at Microsoft.Phone.Info.DeviceStatus.DeviceName but that appears to be different. I have looked at DeviceExtendedProperties but that is mostly deprecated now.

The phone prompts you for this name during setup. I can also see this name and change it in the WinRT App for WP8 preferences. But I'm not seeing a way to get it by API.

(I would like this name so that I can pass it on to a web service that shows a device list)

4

There are 4 answers

2
JustinAngel On BEST ANSWER

There's no public WP8 API to retrieve the user friendly Device Name. If you're looking to uniquely identify the phone's use ANID2.

0
Diego Mejia On

This will give you the manufacturer and model name. For my Nokia Lumia 930, this logs "NOKIA RM-1045_1044" it's not the friendliest name but it'll let you differentiate between devices.

var deviceInformation = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
console.log(deviceInformation.systemSku);
0
Richard On

Windows.Networking.Proximity.PeerFinder.DisplayName will give you the name the user has given to the phone

3
Pedro Lamas On

I don't think that the base API has anything that will allow you to do that, probably due to security concerns!