5
votes

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

4 Answers

0
votes

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.

9
votes

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

1
votes

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

1
votes

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);