ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS...

Preview:

Citation preview

ArcGIS Runtime:

Building Android AppsEric Bader

AgendaMore or less…

• Getting started

• API

- Common Android Runtime SDK patterns

- Common functions and workflows

• Roadmap

Building ArcGIS Android Apps

ArcGIS Navigator ArcGIS Collector ArcGIS Explorer

Getting Started with the SDKSetup Guide

• Sign up for free ArcGIS Developers account

- 50 credits a month, premium content

- register apps

• https://developers.arcgis.com/sign-up

• Install Android Studio IDE

• https://developer.android.com/studio

• Get Runtime Android SDK

- Add dependencies in Gradle (or) …Download the SDK locally

• “Develop your first map app” (Java or Kotlin)

• https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app.htm

Gradle: Adding Runtime SDK Dependency

• Available from a Maven repository hosted on Bintray

• Add Maven Repository to your project’s build.gradle

repositories {

maven { url 'https://esri.bintray.com/arcgis' }

}

• Add SDK dependency in your App Module’s build.gradle

dependencies {

compile 'com.esri.arcgisruntime:arcgis-android:100.2.1’

}

Build your first map appAdd a MapView to Layout

app > res > layout >activity_main.xml

Build your first map appSet the Map to the MapView

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

- Example Apps - https://developers.arcgis.com/example-apps/

- Become a contributor!

• GeoNet Community - http://geonet.esri.com/community/developers/

• Share your ideas with Esri - https://community.esri.com/community/arcgis-ideas/

Example Apps

Maps App Ecological Marine Unit Nearby Your App!

Your App Here!Your App Here!

Offline MapbookExample App

Functionality

• Build native apps for Android devices

• Mapping/Visualization of data – maps (2D), scenes (3D), layers, graphic elements

- Vector layers, raster layers, dynamic, tiled

• Strong data management framework - connected/disconnected/sync

• Search/query, identify features, display info in popups

• Offline maps and scenes, data, routing, geocoding

• Powerful analysis, visual and non-visual, in-memory geometric operations

https://developers.arcgis.com/android/latest/guide/essential-vocabulary.htm

API: Development Patterns

Loadable pattern

• A pattern of loading resources metadata asynchronously

- Layers, Maps, Portal, Geodatabase, FeatureTable, Tasks etc

- Remote services, disk I/O, or data processing

• Formalizes and enhances the behaviors

• Referred as “loadable”

• Provides a generic API across different types of classes

• Implements “Loadable” interface

Loadable pattern

• Loadable is async

- LoadStatus

- LoadError

- Can retry or cancel loading

- Listeners

- Supports chaining of loading

Loadable pattern

• loadAsync()

• getLoadStatus()

- Not_LOADED

- LOADING

- LOADED

- FAIL_TO_LOAD

• getLoadError()

• addDoneLoadingListener()

ListenableFuture

• 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

ListenableFutureSample – Identify-graphics-hittest

ListenableList

• Bind to data

• Listener for when content changes

• Implemented on:

- Graphics in a GraphicsOverlay

- LayerList (operational layers, base, reference)

- SublayerList

- BookmarkList

- Surface.ElevationSourceList

- DistanceCompositeSceneSymbol.RangeCollection

Map and MapViewView Components

• View – Model : Content and presentation are separated

• ArcGISMap – separate class that defines the content

- Listenable lists of Layers, bookmarks, for example

- MapView references ArcGISMap

- Open a map, or build in code, modify, save

• MapView extends android.view.ViewGroup

- GraphicsOverlay(s), LocationDisplay….

- Controls the visible extent of ArcGISMap using Viewpoints

Scene and SceneViewView Components

• ArcGISScene – content

- SceneView references ArcGISScene

- Basemap, ElevationSurface, Layers…

- Build it up in code

• SceneView extends android.view.ViewGroup

- Control view using Viewpoints and Cameras

Loadable pattern

• Intro

• Developer Patterns

• Functional Overview of the SDK

• SDK Components through Apps

• Roadmap

Offline workflows

• Support for on-demand, pre-planned, and desktop workflows

• Use ArcGIS Desktop, Enterprise, or Online

- Mobile Map Packages (MMPK)

- Layer packages (TPK, VTPK)

- GeoPackages

- Mobile geodatabases

- Rasters, raster mosaics

- Locators

- Network datasets

- Routing, closest facility, service area

• StreetMap Premium data extensions

Display device location

• Uses Android platform location providers

- GPS and network location, if enabled

• Customizable appearance

- Symbols

- Centering behavior

- Initial zoom

• LocationDisplay

- MapView.getLocationDisplay()

- LocationDisplay.startAsync()

Only Position

Position& Heading

Position& Course

Authentication

• AuthenticationManager

- Manages user authentication for secured resources

- Central place for

- Setting an authentication challenge handler

- Manage in-memory credential cache

- Manage OAuth Configurations

- Manage client/server certificates

• DefaultAuthenticationChallengeHandler

- UX for challenge

- Credentials (http, token-based, client certificate)

- Self-signed server certificate

DefaultAuthenticationChallengeHandler

AuthenticationManager.setAuthenticationChallengeHandler(

new DefaultAuthenticationChallengeHandler(context));

2018

Roadmap

What’s new and currentVersion 100.2.1

• OGC

- GeoPackages

- WMS

• 3D

- Analysis – line of sight and viewshed

- WGS84 layers

• Shapefiles

• ENC (S-57 only)

• Geodatabase

- Transactional edits

• Offline Mapping

- Preplanned Workflows

• Mobile Map Packages

- Raster datasets

- Tile packages

https://developers.arcgis.com/android/latest/guide/release-notes.htm

HUGE

DISCLAIMER:

The following content is subject to change

Update 3 – June 2018

3D Web GIS release

• Web scene read/write

• Mobile scene packages

• Scene layer

- Selection, identify

- Renderers

- Point cloud

• Visual analysis

- Measure Distance

• Symbology

- Enhanced API

- Web3D

- Web styles

- APP-6(B)

• MrSid

• High accuracy GNSS

• S-63

Update 4 – December 2018Utility release (Phase 1)

• Utility network - connected

- Tracing

• Annotation

• Reference scale

• Create mobile geodatabase

• Cartographic enhancements

• Labeling API

• Dynamic entity

• WFS

• Visual analysis

- View dome

In conclusion

• Free to get going!

- Android Studio

- Free ArcGIS developer account

- ArcGIS Runtime SDK for Android

• ArcGIS Runtime SDK for Android supports a wide range of mapping and

location functions and workflows

• GeoNet – questions, discussions, suggestions!

• Leverage the sample code and example apps on Github

Download the Esri Events

app and find your eventSelect the session

you attended

Scroll down to find the

feedback section

Complete answers

and select “Submit”

Please Take Our Survey in the Esri Events App

Thank you!

Recommended