How to Add Google Play Services to Your Project – Part 1
Below are the steps to integrate Google Play services to your project. First step is to install the Services SDK to Eclipse, second is to integrate this to our application.
Install Google Play Services To Eclipse
1. Launch the SDK Manager
Select Window > Android SDK Manager.
2. Scroll to Bottom of the list and make sure Google play services is installed. Otherwise select the package and install it.
Integrate Google Play Services To Our Application
Note: Play services is a library project so we have to import the project to our workplace.
1. We need to copy the library project from the SDK Location.
For that first go to Eclipse – Window > Preferences Select “Android” tab from top left corner. At the top, we can see the SDK LocationOpen that location in your Windows Explorer Or from Finder in your MAC machine. Once you open the SDK folder go to the following location /extras/google/google_play_services/libproject/. Then copy the folder google-play-services_lib. (This is the folder which needs to be imported)
2.Paste. Two options
Option a: As we are working as groups under different version controls like SVN, git, mercurial etc. The general practice I followed is to add this(copied folder – google-play-services_lib) to one of our locations in our version control and checkout it to our local machine.
Option b: Simply paste the google-play-services_lib folder to any of your location say workplace.
Note: The below method is not right File > Import, select General> Existing Projects into Workspace
4. Refer the Google Play services library project to our Application.
Select your project (not the Google Play services Library Project), then right click on it. Select Properties > Select Android tab from top left corner > In the Library Section Press Add Select google-play-services_lib project and press OK. You can see a green tick in the Library Section left to Google Play Service Library if everything is done right.
In the next part we will deal with ‘how to handle Google Play services not installed in the device’ condition and implement sample Map Apis and may be GCM.