When integrating a Google Plus login button in an Android app, I'm observing some differences in how the button appears on an actual device and in the emulator. I am aware of the fact that the Google Plus services APKs are not installed in the emulator, but this can be worked around by pulling the APKs from a device and installing them into the emulator using APK.
My current "implementation" simply includes the login button in a layout, by referring to the button with the following XML code:
<com.google.android.gms.common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
When I test my app on the device, the button appears all red and shiny, according to the guidelines mentioned here https://developers.google.com/+/mobile/android/sign-in . But when running on the emulator, it's just a normal button (grey background with black text) saying "Sign in with Google".
Any idea why the results are different? I've made sure I'm running the same API level, and the resource does seem to get pulled in correctly also on the emulator since it shows the actual login button (but with a different look).
Update: Found a clue in logcat; the message "Sign in button not found, using placeholder instead." pretty much explains why I'm seeing the grey dull button on the emulator. Still need to figure out why; could be the "copy google plus apk's from device" hack isn't working properly.
Google Play services works on the 4.2.2 versions of the Android Emulator and is officially supported as described in the Android documentation: Setup Google Play Services.
Update
You now can use the Intel/x86 images (HAXM-compatible) for API 19 and newer and for ARM, Google Play Services is available on most images.
Setting up the image
To get the right image for your virtual device manager:
To create the Virtual Device:
Note CPU/ABI will be fixed as ARM
Now you should be able to use the Google Play Services in the emulator. Of note, you need to set your target appropriately in your Android project to the Google APIs in order for Google Play Services to work.