private static string GetDeviceType()
{
var deviceType = Microsoft.Devices.Environment.DeviceType;
switch (deviceType)
{
case Microsoft.Devices.DeviceType.Device: return "phone";
case Microsoft.Devices.DeviceType.Emulator: return "emulator";
default: return "unknown";
}
}