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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top