Created
September 7, 2020 11:36
-
-
Save yusufceylan/b0be325b8117bee9167919463bf39c9d to your computer and use it in GitHub Desktop.
Huawei Location Kit - Remove Location Updates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun unregisterLocationUpdates() { | |
mLocationCallback?.let { locationCallback -> | |
mFusedLocationProviderClient.removeLocationUpdates(locationCallback) | |
.addOnSuccessListener { | |
// Requesting location updates is stopped successfully. | |
LogUtils.d("LocationKit -> Stop Listening Location Successfully") | |
} | |
.addOnFailureListener { | |
// Failed to stop requesting location updates. | |
LogUtils.d("LocationKit -> Stop Listening Location Failed with exception: ${it.localizedMessage}") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment