Andy Weston
Andy Weston

Reputation: 157

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

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)

Upvotes: 5

Views: 3060

Answers (4)

Diego Mejia
Diego Mejia

Reputation: 141

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

Upvotes: 1

Richard
Richard

Reputation: 91

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

Upvotes: 9

JustinAngel
JustinAngel

Reputation: 16102

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.

Upvotes: 0

Pedro Lamas
Pedro Lamas

Reputation: 7243

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

Upvotes: 1

Related Questions