Is there a method I can call to see if I am currently running in the emulator vs. running on an actual physical phone?
I need to run some code a bit differently when I am in the emulator (I have a mock gps location service).
There is no official API in iOS or Android to detect an emulator. Therefore, several proprietary checks have to be done by the RASP system.
The Windows 10 SDK and emulator can be installed as part of the Visual Studio installation. See the Visual Studio download page. You can also install the Microsoft Emulator for Windows 10 Mobile using the Microsoft Emulator setup.
You can get this from Microsoft.Devices.Environment.DeviceType
if (System.Environment.DeviceType == DeviceType.Emulator)
{
}
Hope that helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With