2020 ESRI DEVELOPER SUMMIT
Rama ChintapalliPriyanka Rupani
ArcGIS Runtime SDK for Android - Building Apps
Agenda
➢Introduction
➢Developer Patterns
➢Overview of SDK
➢App Themes
➢What’s coming
Building ArcGIS Android Apps
➢ Sign up for free ArcGIS Developers account○ register apps○ 1M basemap/geocode transactions
https://developers.arcgis.com/sign-up
➢ Install Android Studio IDEhttps://developer.android.com/studio
➢ Get ArcGIS Runtime Android SDK○ As dependency in Gradle (or)○ Download the SDK locally
https://developers.arcgis.com/android/latest/guide/install-and-set-up.htm
Getting Started with SDKSetup Guide
➢ Available from a maven repository hosted on Bintray
➢ Add maven repository to project build.gradlerepositories {
maven { url 'https://esri.bintray.com/arcgis' }}
➢ Add SDK dependency in app’s module build.gradledependencies {
implementation 'com.esri.arcgisruntime:arcgis-android:100.7.0'implementation 'com.esri.arcgisruntime:arcgis-android-toolkit:100.7.0'
}
Gradle: Adding Runtime SDK Dependency
Build Your First Map AppKotlin or Java
PriyankaFirst Map App
SDK Resources
➢ Developers site - http://developers.arcgis.com/android○ Guide Doc ○ API Reference○ Samples Details
➢ GitHub○ Samples Code
http://github.com/Esri/arcgis-runtime-samples-android
➢ GeoNet Communityhttp://geonet.esri.com/community/developers/
SDK Resources ...
➢ Sample Viewer App○ Available in Android Playstore○ https://play.google.com/store/apps/details?id=com.esri.sampleviewer&hl=en_US
➢ Dev Labs○ Step by Step instructions
https://developers.arcgis.com/labs/browse/?topic=any&product=Android
➢ Open Source Apps○ https://developers.arcgis.com/example-apps/
Android CPU Architectures
➢ Supports ArmV8 (64 bit) & ArmV7, x86 (32 bit) native libraries
➢ ABI Filter○ Filters the native lib○ Reduces APK Size
➢ Multiple APK’s to PlayStore○ https://developer.android.com/studio/build/configure-apk-splits
And reducing APK size
PriyankaDeveloper Patterns
Loadable pattern
➢A pattern of loading resources metadata asynchronously○ Layers, Maps/Scenes, Portal, Tasks, Geodatabase, etc
○ Remote services, disk I/O, or data processing
➢Implements “Loadable” interface
Loadable pattern
➢addDoneLoadingListener()
➢getLoadStatus()○ NOT_LOADED
○ LOADING
○ LOADED
○ FAIL_TO_LOAD
➢getLoadError()
➢loadAsync()
Loadable pattern
➢Chaining of loadables
ListenableFuture pattern
➢Asynchronous methods use ListenableFuture○ A promise to return a result
○ Add done listener, or call get (blocking)
➢Simplify asynchronous programming ○ Executes operations on background threads
○ Standard pattern for errors
ListenableFuture pattern
➢Future is a wrapper around an object that is not there yet
ListenableList pattern
➢Listener to know when content changes
➢Implemented on ○ GraphicsOverlay.getGraphics()
Task and Job pattern
➢Tasks may return result directly
➢Longer running/complex operations return Job
instead
➢Jobs
○ Report progress
○ Pause, resume, cancel
https://developersdev.arcgis.com/android/latest/guide/tasks-and-jobs.htm
Task and Job pattern
➢Create task
➢Create parameters
➢Create job○ ProgressChangedListener
○ JobDoneListener
➢Start
RamaOverview - SDK
View Components
GraphicsOverlayGrid (MapView)AttributionTextCalloutLocationDisplayMagnifier SketchEditorToolkit Components
Overview of SDK
SceneViewMapView
GeoView
ArcGISMap ArcGISScene
ViewGroup(android)
Overview of SDK ...Model (Map/Scene) Components and their Source
FeatureLayer
ArcGISMap
ArcGISScene
Layers /Tables
ArcGISTiledLayer ArcGISVectorTiledLayerArcGISMapImageLayerRasterLayerAnnotation Layer….
MobileMapPackage(Local)
Webmap(Service)
WebScene(Service) WMSLayer
WMTSLayer BingMapsLayer ENCLayerOpenSteetMapLayerKMLLayer
ServiceFeatureTableGeodatabaseFeatureTable
ShapefileFeatureTable
GeoPackageFeatureTable
ArcGISSceneLayerPointCloudLayerArcGIS Pro/Desktop
ArcGIS Online ArcGIS Entreprise OGC/ Third Party
WFSFeatureTableMobileScenePackage(Local)
Tasks & Other ComponentsOverview of SDK ...
MapSceneLayer
Search & Navigation
● LocatorTask● RouteTask● RouteTracker
Offline
● OfflineMapTask● OfflineMapSyncTask● GeodatabaseSyncTask● ExportTileCacheTask● ExportVectorTileCacheTas
k
Utility Networks
● UtilityNetwork● UtilityAssetType
Analysis 2D/3D
● GeoprocessingTask● LineOfSight● Viewshed
ArcGIS Platform
● Portal● Security● Geometry● Popup
Rama & PriyankaApp Themes
Mapping
➢Allows Authentication with ArcGIS Online or your
own portal
➢Place search feature, use geocode functionality
➢Using routing service to navigate
PriyankaMapping Demo
RamaData Collection/Offline
Offline PatternsServices Pattern
➢Services Pattern○ On-Demand
■ User Controlled
○ Preplanned■ Admin Controlled
■ Scheduled Updates
○ Referenced Basemaps
○ Support for Polygon Area of Interest
Area 1
Area 2
Offline PatternsDesktop Pattern
➢Desktop Pattern○ Mobile Map Packages
○ Mobile Scene Packages
○ Honor expiration date
Rama
Demo Offline
RamaUtilities
• Visualize Network Assets
• Discover Assets Connectivity• Trace resources flow through network
- Upstream- Downstream- Subnetwork- Connected
Utility Networks
Rama
Demo Utility Networks
Priyanka3D & Augmented Reality
3D & Augmented Reality
➢Display Scenes in Augmented Reality
➢Support Augmented Reality through AR Toolkit
➢AR experience in three patterns: ○ TableTop
○ Flyover
○ World-scale
Priyanka3D & AR
• Replace GLSurfaceView with TextureView
• Support for Arcade Feature Sets in Popups
• Allow online services in Mobile Map/Scene Packages
• Enhance Utility Networks capabilities
• And many more ...
What’s coming
Agenda
➢Introduction
➢Developer Patterns
➢Overview of SDK
➢App Themes
➢What’s coming
Top Related