If you need functionality in the AWS services used by the Amplify Geo category that isn't available, we provide an escape hatch so you can get a reference to that service. import android0 from "/src/fragments/lib/android-escape-hatch-warning.mdx"; Note: If you provisioned your Geo resources via Amplify CLI, then the IAM policy will be specifically scoped to only allow actions required by the library. Please [adjust your authorization permissions](/lib/geo/existing-resources) accordingly for your escape hatch use-cases. import android1 from "/src/fragments/lib/android-kotlin-java-interop.mdx"; ```java import android.util.Log; import androidx.annotation.NonNull; import com.amplifyframework.core.Amplify; import com.amplifyframework.geo.location.AWSLocationGeoPlugin; import aws.sdk.kotlin.services.location.LocationClient; import aws.sdk.kotlin.services.location.model.ListMapsRequest; import aws.sdk.kotlin.services.location.model.ListMapsResponse; import kotlin.Unit; import kotlin.coroutines.Continuation; import kotlin.coroutines.CoroutineContext; import kotlinx.coroutines.GlobalScope; ``` ```java // Obtain reference to the plugin AWSLocationGeoPlugin geoPlugin = (AWSLocationGeoPlugin) Amplify.Geo.getPlugin("awsLocationGeoPlugin"); LocationClient locationClient = geoPlugin.getEscapeHatch(); // Send a new request to the Location Maps endpoint directly using the client ListMapsRequest request = ListMapsRequest.Companion.invoke(requestBuilder -> Unit.INSTANCE); locationClient.listMaps(request, new Continuation() { @NonNull @Override public CoroutineContext getContext() { return GlobalScope.INSTANCE.getCoroutineContext(); } @Override public void resumeWith(@NonNull Object resultOrException) { Log.i("MyAmplifyApp", resultOrException.toString()); } }); ``` ```kotlin import android.util.Log import aws.sdk.kotlin.services.location.LocationClient import aws.sdk.kotlin.services.location.model.ListMapsRequest import com.amplifyframework.core.Amplify ``` ```kotlin // Obtain reference to the Amazon Location Service client val geoPlugin = Amplify.Geo.getPlugin("awsLocationGeoPlugin") val locationClient = geoPlugin.escapeHatch as LocationClient // Send a new request to the Location Maps endpoint directly using the client val request = ListMapsRequest { } val response = locationClient.listMaps(request) Log.i("MyAmplifyApp", response.entries.toString()) ``` ### Documentation Resources * [How to manage Amazon Location Service resources through console](https://docs.aws.amazon.com/location/latest/developerguide/welcome.html) **Maps** * [Using Amazon Location Maps in your application](https://docs.aws.amazon.com/location/latest/developerguide/using-maps.html) * [Amazon Location Maps API Reference](https://docs.aws.amazon.com/location-maps/latest/APIReference/API_Operations.html) **Places** * [Searching place and geolocation data using Amazon Location](https://docs.aws.amazon.com/location/latest/developerguide/searching-for-places.html) * [Amazon Location Places API Reference](https://docs.aws.amazon.com/location-places/latest/APIReference/API_Operations.html) **Device Tracking** * [Managing your tracker resources](https://docs.aws.amazon.com/location/latest/developerguide/managing-trackers.html) * [Amazon Location Trackers API Reference](https://docs.aws.amazon.com/location-trackers/latest/APIReference/API_Operations.html)