Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 29, 2024

Use Amazon Location Service SDK

Amplify Android v1 is deprecated as of June 1st, 2024. No new features or bug fixes will be added. Dependencies may become outdated and potentially introduce compatibility issues.

Please use the latest version (v2) of Amplify Library for Android to get started. Refer to the upgrade guide for instructions on upgrading your application to the latest version.

Amplify libraries should be used for all new cloud connected applications. If you are currently using the AWS Mobile SDK for Android, you can access the documentation here.

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.

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 accordingly for your escape hatch use-cases.

import android.util.Log;
import com.amazonaws.services.geo.AmazonLocationClient;
import com.amazonaws.services.geo.model.ListMapsRequest;
import com.amazonaws.services.geo.model.ListMapsResult;
import com.amplifyframework.core.Amplify;
import com.amplifyframework.geo.location.AWSLocationGeoPlugin;
// Obtain reference to the plugin
AWSLocationGeoPlugin geoPlugin = (AWSLocationGeoPlugin)
Amplify.Geo.getPlugin("awsLocationGeoPlugin");
AmazonLocationClient locationClient = geoPlugin.getEscapeHatch();
// Send a new request to the Location Maps endpoint directly using the client
ListMapsRequest request = new ListMapsRequest();
ListMapsResult response = locationClient.listMaps(request);
Log.i("MyAmplifyApp", response.getEntries().toString());
import android.util.Log
import com.amazonaws.services.geo.AmazonLocationClient
import com.amazonaws.services.geo.model.ListMapsRequest
import com.amplifyframework.core.Amplify
// Obtain reference to the Amazon Location Service client
val geoPlugin = Amplify.Geo.getPlugin("awsLocationGeoPlugin")
val locationClient = geoPlugin.escapeHatch as AmazonLocationClient
// 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

Maps

Places

Device Tracking