Code example for LocationClient

Methods: removeLocationUpdates

0
        // Turn off the request flag 
        mInProgress = false;
 
        if(servicesAvailable && mLocationClient != null)
        { 
            mLocationClient.removeLocationUpdates(this);
 
            // Destroy the current location client 
            mLocationClient = null;
        } 
 
        // Pass the remove request to the remover object 
        mDetectionRemover.removeUpdates(mDetectionRequester.getRequestPendingIntent());
 
        /* 
         * Cancel the PendingIntent. Even if the removal request fails, canceling the PendingIntent 
         * will stop the updates. 
         */ 
        mDetectionRequester.getRequestPendingIntent().cancel();
 
        super.onDestroy();