Skip to content

Instantly share code, notes, and snippets.

View mars-amn's full-sized avatar
:octocat:

Abdullah El Amien mars-amn

:octocat:
View GitHub Profile
private fun GeofencePickerClick() {
checkIfUserEnabledLocationNetwork() // don't call it unless you're sure that the user granted location permission
}
private fun checkIfUserEnabledLocationNetwork() {
val responseTask = getLocationNetworkTask()!!
responseTask.addOnSuccessListener { startMapActivity() }
.addOnFailureListener {
val apiException = it as ApiException
when (apiException.statusCode) {