title: How can I detect when an Android application is running in the emulator?
body: <p>I would like to have my code run slightly differently when running on the emulator than when running on a device. (<strong>For example</strong>, 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?</p>