LocationServices.SettingsApi deprecated : <p>My code is:</p>

<pre><code>if (mGoogleApiClient == null &amp;&amp; checkGooglePlayService()) {
        Log.d(Utils.TAG_DEV + TAG, "Building GoogleApiClient");
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .addApi(LocationServices.API)
                .build();
        mLocationRequest.setInterval(UPDATE_INTERVAL_IN_MILLISECONDS);
        mLocationRequest.setFastestInterval(FASTEST_UPDATE_INTERVAL_IN_MILLISECONDS);
        mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
        LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder();
        builder.addLocationRequest(mLocationRequest);
        builder.setAlwaysShow(true);
        mLocationSettingsRequest = builder.build();
        PendingResult&lt;LocationSettingsResult&gt; result =
                LocationServices.SettingsApi.checkLocationSettings(
                        mGoogleApiClient,
                        mLocationSettingsRequest
                );
        result.setResultCallback(this);

    }
</code></pre>

<p>but unfortunately the LocationServices.SettingsApi is deprecated. How can I replace deprecated code with the new one?</p>

<p>I found reading docs that the solution can be to use SettingsClient but couldn't figure how to do it.</p>

<p>Any ideea what to do to can update my code?</p>
