How can I detect the Android emulator?

Posted by Joe Ludwig on Stack Overflow See other posts from Stack Overflow or by Joe Ludwig
Published on 2010-05-09T20:40:29Z Indexed on 2010/05/09 20:48 UTC
Read the original article Hit count: 369

Filed under:
|

I would like to have my code run slightly differently when running on the emulator than when running on a device. (For example, using 10.0.2.2 instead of a public URL to run against a development server automatically.) What is the best way to detect when an Android application is running in the emulator?

© Stack Overflow or respective owner

Related posts about android

Related posts about android-emulator