Wednesday, March 25, 2015

Setting Up Google Play Services, for Eclipse-Android SDK

This video show how to set up Google Play Services on Eclipse with Android SDK, reference Google document Setting Up Google Play Services.

Include how to:
- Install Google Play services SDK using Android SDK Manager.
- Import library project google-play-services_lib.
- Add referencing to google-play-services_lib in your project.
- Modify AndroidManifest.xml, to add <meta-data android:name="" android:value="@integer/google_play_services_version" /> under <application>.

Also override onResume() method, to call GooglePlayServicesUtil.isGooglePlayServicesAvailable() method to test our setup.

Then finally, try something wrong, in case:
- With google-play-services_lib project closed, Errors of java.lang.NullPointerException occurred during the build.

- Without <meta-data...> in AndroidManifest.xml, no error in compiling, but fail in run time.

- Without referencing to google-play-services_lib, cannot resolve

Once you've set up your project to reference the library project, you can begin developing features with the Google Play services APIs.

No comments: