Introduction
...
...
Info |
---|
title | Using Google Play Services |
---|
|
If you choose to use Google Play Services, you need to know the following : To test your app when using the Google Play services SDK, you must use either: - A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
- The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
To make the Google Play services APIs available to your app: - Copy the library project at
<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects. - Import the library project into your Eclipse workspace (if you use Eclipse) : Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
- In your app project, reference Google Play services library project.
Note: You should be referencing a copy of the library that you copied to your development workspace—you should not reference the library directly from the Android SDK directory. - Use the AndroidManifest.xml written below for GooglePlayServices integration
- To prevent ProGuard from stripping away required classes, add the following lines in the
<project_directory>/proguard-project.txt file: Code Block |
---|
language | text |
---|
title | ProGuard |
---|
| -keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
} |
|
...