Session

class Session

Session has a limited lifetime. The lifetime follows this call graph:

[0..N] autocomplete requests
then either of
[1] do nothing -> close session
[1] geocode with location ID -> close session
[1] geocode with query -> close session
[1] search places with query -> [0..N] search places with continuation token -> close session

Functions

autocomplete
Link copied to clipboard
fun autocomplete(request: SearchRequest, listener: AutocompleteResultListener, executor: Executor? = null)

Performs autocomplete, can be called 0..N times during single session, if afterwards

cancel
Link copied to clipboard
fun cancel()

Cancels last operation, note that you still have to close the session, if you don't need it anymore Also canceling does not have any effect, if the listener callback is already scheduled on executor

close
Link copied to clipboard
fun close()

Closes the session, if you don't need it anymore

geocode
Link copied to clipboard
fun geocode(request: GeocodeLocationRequest, listener: GeocodingResultListener, executor: Executor? = null)

Performs geocode on a location, can be called once during single session and afterwards session has to be closed

fun geocode(request: SearchRequest, listener: GeocodingResultsListener, executor: Executor? = null)

Performs geocode with a query, can be called once during single session and afterwards session has to be closed

searchPlaces
Link copied to clipboard
fun searchPlaces(request: PlacePageRequest, listener: PlacesListener, executor: Executor? = null)

Performs places search with a continuation token, can be called 0..N times during single session and afterwards the session closed has to be closed

fun searchPlaces(request: PlaceRequest, listener: PlacesListener, executor: Executor? = null)

Performs places search with a query, can be called once during single session and afterwards either searchPlaces() with PlacePageRequest can be called or the session closed

Properties

id
Link copied to clipboard
val id: Long
manager
Link copied to clipboard
val manager: SearchManager