Forum Xamarin.Android

Device vs Emulator Test

Is there a runtime test I can perform to determine if the app is running on an actual device versus running in the emulator on a Mac? For example, on the iOS side, you can use this:

if (UIDevice.CurrentDevice.Model == "iPhone Simulator")


  • CheesebaronCheesebaron DKInsider, University mod

    Build.Product should return google_sdk or sdk if run on one of the Android AVD's. IMEI should return all zeroes, Build.Fingerprint should return generic. These seem all to be a valid check for detecting whether you are running on an emulator.

Sign In or Register to comment.