Question: In my application, I need to check Google Play services version (which is installed in user's device). Is it possible ? And if yes, how can I do that?

Answer: 
I’ve run into the same problem this morning. And got it done by the advice from stan0. Thanks stan0.

Only one change is needed based on the sample code from <https://developers.google.com/maps/documentation/android/map>.

```
private void setUpMapIfNeeded() {
    // Do a null check to confirm that we have not already instantiated the
    // map.
    if (mMap == null) {
        FragmentManager mgr = getFragmentManager();
        MapFragment mapFragment = (MapFragment)mgr.findFragmentById(R.id.map);
        mMap = mapFragment.getMap();
        // Check if we were successful in obtaining the map.
        if (mMap != null) {
            // The Map is verified. It is now safe to manipulate the map.
            setUpMap();
        }else{
            // check if google play service in the device is not available or out-dated.
            GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);

            // nothing anymore, cuz android will take care of the rest (to remind user to update google play service).
        }
    }
}

```

Besides, you need to add an attribute to your manifest.xml as:

```
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="your.package.name"
android:versionCode="3225130"
android:versionName="your.version" >

```

And the value of "3225130" is taken from the google-play-services\_lib that your project is using. Also, that value is residing in the same location of manifest.xml in google-play-services\_lib.
Use the following function to check if google play services could be used or not

```
 private boolean checkGooglePlayServicesAvailable() {
    final int connectionStatusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
    if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) {
        showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);
        return false;
    }
    return true;
}

```