Thursday, 27 September 2018

How can I detect when an Android application is running in the emulator?

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?



from How can I detect when an Android application is running in the emulator?

No comments:

Post a Comment