Reputation: 10181
In an 8.1 Universal app, is there an equivalent to:
if (Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator)
{
// Emulator-specific code
}
I've looked and can't find a similar API.
Upvotes: 5
Views: 1066
Reputation: 13
You could try something like this:
if (Windows.ApplicationModel.Package.Current.IsDevelopmentMode)
{
// Emulator-specific code
}
Upvotes: 0
Reputation: 15006
You could try something like this:
Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
deviceInfo
should give you info about SystemManufacturer
("Microsoft") & SystemProductName
("Virtual").
EDIT: I wrote a blog post about this problem.
Upvotes: 3