Comment on page

Location

Handles requests related to location via IMS web services. This service fetches the last known location for the host application's user.

Required information

*Identity: In order to fetch user location, the application must have a valid user (represented by the Identity).

Concrete example

To fetch a user's last known location one can use following snippet
Swift
Kotlin
let service = LocationService(identity: identity)
service.fetchLastKnownLocation(then: { result in
guard !result.value.isEmpty else {
// error
return
}
completionHandler(.success(result.value))
})
val service = LocationService(identity)
service.fetchLastKnownLocation() { result: Result<Content?>? ->
if (result?.value == null || result.throwable != null) {
// failure
} else {
// Success
val content = result.value
completionHandler(content)
}
})
Last modified 2mo ago