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
Both the following are set to "google_sdk":
Build.PRODUCT Build.MODEL
So it should be enough to use either one of the following lines.
"google_sdk".equals(Build.MODEL)
or
"google_sdk".equals(Build.PRODUCT)