how to tell if I'm running on the emulator

  • Thread starter Thread starter Bruce Bakely
  • Start date Start date
B

Bruce Bakely

I would like to skip certain sections of code - like using the scanner - if
I'm on the emulator. Does anyone know how I can know at run time if it's the
emulator or actual device?
 
You could try checking for the CPU architecture but there are real devices
that use x86. Why don't you instead attempt to open Scanner in the
initialization part of your app and set a flag, which you could use later?
 
Back
Top