ArcGIS Runtime SDK for
Android
Copyright © 1995-2018 Esri. All rights reserved.
Table of Contents
Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Get started
Install the SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Migrate to 100.x from 10.2.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Develop your first map app with Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Develop your first map app with Kotlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Fundamentals
Maps and scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Layers and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Layer types described . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Features and graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Symbols, styles, and renderers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Tasks and jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Geometries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Spatial references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Loadable pattern for asynchronous resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Work with maps (2D)
Display a map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Build a new map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Wraparound maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Save a map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Add a layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Create an offline map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Create an offline layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Work with scenes (3D)
Display a scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Build a new scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Navigate a scene view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Add features and graphics to a scene view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
ArcGIS Runtime SDK for Android
Copyright © 1995-2018 Esri. All rights reserved.
2
Follow a graphic in a scene view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Display information
Add graphics overlays to your app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Add graphics and text to graphics overlays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Display military symbols with a dictionary renderer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Display electronic navigational charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Display a grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Label map features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Add raster data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Display KML content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Show the device's location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Visualize and compare data over time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Search
Identify features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Search for places (geocoding) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Search for related features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Edit features
Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Edit features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Use geodatabase transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Relate features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Edit geometries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Sync offline edits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Route and get directions
Find a route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Add StreetMap Premium data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Generate service areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Route to closest location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Perform analysis
Geoprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Run a geoprocessing task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Get feature statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
ArcGIS Runtime SDK for Android
Copyright © 1995-2018 Esri. All rights reserved.
3
Make measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Manage analyses with analysis overlays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Analyze visibility in a scene view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Use the cloud and servers
Access the ArcGIS platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Access portal content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Search for content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Add items to a portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Share a portal item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Design considerations
Handle device configuration changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
Performance considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Release your app
License your app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Deploy your app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Reference
Release notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Essential vocabulary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
Coordinate systems and transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Support for the web scene specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Platform error codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Legal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
ArcGIS Runtime SDK for Android
Copyright © 1995-2018 Esri. All rights reserved.
4
Guide
This guide describes how to use version 100.4.0 of ArcGIS Runtime SDK for Android to build Android apps that incorporate
capabilities such as mapping, geocoding, routing, geoprocessing, and other spatial analytics.
Build apps that:
• Add high performance 2D and 3D mapping and GIS capabilities to your apps.
• Consume content and services from ArcGIS Online and ArcGIS Enterprise portal (using the portal API).
• Let mobile users take their work with them, provisioning them with the offline processing and data (basemaps and
operational data) that they need in the field.
• Add tools to edit data while out in the field or disconnected and sync the edits when connected.
• Search for features or attributes in your GIS data using SQL or spatial criteria and display the results.
• Perform blazing fast offline searches for locations (geocode and reverse geocode).
• Calculate drive times and multi-stop routes with driving directions (find routes).
• Execute sophisticated geoprocessing tasks and display their results.
• Allow users to add graphics and markup to a map interactively.
• Display map details through informational pop-ups on features.
A great place to start developing once you have installed and set up the SDK is to develop your first map app or try out the
samples. For what's new in this release, see Release notes.
What you get
• A rich mapping API for Android, provided through .jar files.
• An Android Archive (AAR) file to use as a dependency in your Gradle build script.
• An online developer's guide and API reference. You can download past versions of the developer's guide in PDF from the
downloads page if you sign in.
• A suite of samples that demonstrate SDK functionality.
• A blog highlighting new developments and important SDK related news
• A community space where you can discuss your development issues with other SDK developers
Related topics
Release notes
Install the SDK
Develop your first map app with Java
ArcGIS Runtime SDK for Android
Copyright © 1995-2018 Esri. All rights reserved.
5