i am new to GeoFencing and i am trying to add API to the GoogleApiClient instance.But it is showing error like can't find variable LocationServices. Here is my code:
private void createGoogleApi() {
Log.d(TAG, "createGoogleApi()");
if ( googleApiClient == null ) {
googleApiClient = new GoogleApiClient.Builder( this )
.addConnectionCallbacks( this )
.addOnConnectionFailedListener( this )
.addApi(LocationServices.API)
.build();
}
}
And my gradle is
compile 'com.google.android.gms:play-services-maps:9.8.0'
Manifest file
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="Server_key" />
Can you pls look into this.or else you can provide some other docs or links for reference.Thanks