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="com.google.android.gms.version" 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 com.google
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:
Post a Comment