Arc GIS Runtime SDK for Android An Introduction

  • Slides: 52
Download presentation
Arc. GIS Runtime SDK for Android An Introduction Dan O’Neill Xueming Wu @jdoneill @xuemingrocks

Arc. GIS Runtime SDK for Android An Introduction Dan O’Neill Xueming Wu @jdoneill @xuemingrocks

Agenda • Introduction to the Arc. GIS Android SDK • Maps & Layers •

Agenda • Introduction to the Arc. GIS Android SDK • Maps & Layers • Basemaps (Portal) • Location • Place Search • Routing • Authentication • Maps App • Quartz

Intro to SDK Arc. GIS Runtime SDK for Android

Intro to SDK Arc. GIS Runtime SDK for Android

SDK Introduction - Features of the Arc. GIS Android SDK • High performance Mapping

SDK Introduction - Features of the Arc. GIS Android SDK • High performance Mapping and GIS capabilities • Add and query content from your Organization • Work offline with Basemaps and operational data • Display maps in support spatial references • Work with your device GPS • Offline/Online routing • Add graphics to maps • Advanced geometric and spatial analysis operations

SDK Introduction - What you get • Rich mapping API for native Android app

SDK Introduction - What you get • Rich mapping API for native Android app development - multiple ways to get API • Android Library module (AAR) from a public maven repository - Preferred way to work with the SDK • API Reference (Javadoc) & Guide documentation - developers. arcgis. com/android • Suite of samples - Git. Hub samples • User Forum - Geo. Net/GIS Stack Exchange • Blogs

SDK Intro - How to get the SDK • Android Studio - Official IDE

SDK Intro - How to get the SDK • Android Studio - Official IDE for Android development - Based on Intelli. J IDEA - Project & File Structure - Android project view • Gradle - Android plugin for Gradle - Groovy Goodness - Flexible build system - custom build logic - Manage dependencies - Runs independent of Android Studio

SDK Intro - How you get the SDK Add repository URL Add Arc. GIS

SDK Intro - How you get the SDK Add repository URL Add Arc. GIS Android dependency

DEMO Your first android app - Hello World

DEMO Your first android app - Hello World

SDK Introduction - Samples Open Source Samples • Get an account (if you don’t

SDK Introduction - Samples Open Source Samples • Get an account (if you don’t already have one) • Fork the repo • Clone the repo locally • Import project into Android Studio • Run Sample

DEMO Fork/Clone the Samples

DEMO Fork/Clone the Samples

SDK Intro - What’s in the local SDK Download • doc - API Ref

SDK Intro - What’s in the local SDK Download • doc - API Ref - Javadoc • legal - license info • libs - dependency jars and native libs - local Arc. GIS Android SDK Library Module AAR • res - localization files • resources - Military symbol dictionaries • samples - archive snapshot of samples from Git. Hub

SDK Intro - What’s exclusive in the local SDK • Localization resources - Localization

SDK Intro - What’s exclusive in the local SDK • Localization resources - Localization of Popups • Advanced Symbology symbol dictionaries - APP 6 B and MIL 2525 C symbol dictionaries • Beta Analysis libs - Native libs to support offline Spatial Analysis

Maps & Layers

Maps & Layers

Maps & Layers – Layer Types • • Dynamic. Layer Feature. Layer Graphics. Layer

Maps & Layers – Layer Types • • Dynamic. Layer Feature. Layer Graphics. Layer Group. Layer Kml. Layer Raster. Layer Tiled. Layer

Maps & Layers – Dynamic Layers • Abstract Base Class • Sub-classes - Arc.

Maps & Layers – Dynamic Layers • Abstract Base Class • Sub-classes - Arc. GISDynamic. Map. Service. Layer - Arc. GISImage. Service. Layer - WMSLayer

Maps and Layers – Tiled. Layer • Abstract Base Class • Direct sub-classes -

Maps and Layers – Tiled. Layer • Abstract Base Class • Direct sub-classes - Arc. GISLocal. Tiled. Layer - Tiled. Service. Layer • Indirect sub-classes - Arc. GISTiled. Map. Service. Layer - Bing. Maps. Layer - Open. Street. Map. Layer - WMTSLayer

Maps & Layers – Graphics Layer • Layer representing one or more Graphics -

Maps & Layers – Graphics Layer • Layer representing one or more Graphics - Dynamically display Graphics on a Map. View - Graphics can be geometries or features • Map. View can contain one or more Graphic. Layers

Basemaps Portal

Basemaps Portal

Basemaps ● Arc. GIS Online provides a living atlas of the world ○ Delivered

Basemaps ● Arc. GIS Online provides a living atlas of the world ○ Delivered as map service ○ Freely available to anyone ○ Include ■ World Imagery ■ World Street Map ■ World Topographic Map ■ Ocean Basemap ■ and more

Basemaps - From Portal How to get them in your app ● Portal ●

Basemaps - From Portal How to get them in your app ● Portal ● ● ● ○ Provides the connection information to the portal Portal. Info ○ Name, logo, featured items, etc Portal. Group ○ Represents a group in a portal Portal. Item ○ Represents an item in a portal Portal. Query. Params ○ Creates query parameters for finding content Portal. Query. Result ○ Results of the queries performed on a portal

Location

Location

Location - GPS • Use the power of your device to show where you

Location - GPS • Use the power of your device to show where you are • Knowing where you are allows apps to return smarter information back • Location. Display. Manager provides the current location - Device location on a Map - Auto pan - Listen to events - pause - resume

DEMO BASEMAP & Location https: //github. com/Esri/arcgis-runtime-demos-android/tree/master/2015 -DS/Material. Base. Maps

DEMO BASEMAP & Location https: //github. com/Esri/arcgis-runtime-demos-android/tree/master/2015 -DS/Material. Base. Maps

Place Search

Place Search

Place Search - Geocoding • Arc. GIS Online Geocoding service - Global coverage •

Place Search - Geocoding • Arc. GIS Online Geocoding service - Global coverage • Locator uses this in default constructor • Find method allows for address and POI search • Locator. Find. Parameters - Set source Country - Point and radius parameters - Set Max returned location candidates Locator. find(Locator. Find. Parameters)

Place Search – search suggestions • Location. Suggestion. Parameters - Results in radius are

Place Search – search suggestions • Location. Suggestion. Parameters - Results in radius are promoted - Sorted by distance to point - Results outside radius still returned Locator. suggest(Location. Suggestion. Parameters)

Place Search – Toolkit Simplification • Arc. GIS Android Toolkit API • Provides Geocode.

Place Search – Toolkit Simplification • Arc. GIS Android Toolkit API • Provides Geocode. Helper class • Find location for a given address • Simplifies the workflow - No need to set parameters and get result from a Locator

DEMO Place Search

DEMO Place Search

Routing

Routing

Routing API - Workflow • Create a Route Task • Set up Route Task

Routing API - Workflow • Create a Route Task • Set up Route Task Parameters • Set stops • Calculate • Get results • Display • Get route on map directions and display to user

DEMO Routing

DEMO Routing

Authentication

Authentication

Authentication • When do you need to authenticate - Access users private content -

Authentication • When do you need to authenticate - Access users private content - Create and publish content - Access premium content on Arc. GIS Online • Authentication modes - Token-based - HTTP/Windows - PKI

OAuth • Have you heard about OAuth? • Authentication patterns - User login -

OAuth • Have you heard about OAuth? • Authentication patterns - User login - App login • User login - Allow Arc. GIS Online users to authorize your application on their behalf - Two steps process: - authorization → authorization code - exchange code for tokens → access token and refresh token

OAuth • Create an OAuth. View in code or from xml - portal url

OAuth • Create an OAuth. View in code or from xml - portal url - client id - Callback. Listener • Get credentials from Callback. Listener. on. Callback • Handle error in Callback. Listener. on. Error() • Customize the http authentication request dialog

Maps App

Maps App

Maps App ● Material ○ Navigation Drawer ● Search Widget ● Floating Compass Button

Maps App ● Material ○ Navigation Drawer ● Search Widget ● Floating Compass Button ● Fragments ○ Routing Dialog ○ Directions Dialog ○ Basemaps Dialog

Maps App on Git. Hub ● https: //github. com/Esri/maps-app-android ● Get involved ● Report

Maps App on Git. Hub ● https: //github. com/Esri/maps-app-android ● Get involved ● Report Issues ● Contribute Code ○ Fork it ○ Clone it ○ Configure remotes ○ Send pull requests

DEMO Maps App

DEMO Maps App

Offline support ● Take a map offline ○ View ○ Edit ○ Sync ●

Offline support ● Take a map offline ○ View ○ Edit ○ Sync ● Perform offline tasks ○ Analysis (Beta) ○ Routing/Geocoding ○ Query

Quartz

Quartz

Map Decoupled from Map. View • Content • Map and presentation are separated is

Map Decoupled from Map. View • Content • Map and presentation are separated is now a separate class (model object) -Declare in code only -Defines the data displayed by the Map. View -Contains content - layers, basemap, bookmarks -Open an existing map or build in code, modify, save Map. View (view object) Has a map set on it Extends android. view. View. Group Control visible area of Map using Viewpoints Graphics. Overlay(s), Location. Display, …

Asynchronous methods • 10. 2. x had sync & async methods - Result execute(Parameters

Asynchronous methods • 10. 2. x had sync & async methods - Result execute(Parameters params) - Future<Result> • In execute(Parameters params, Callback. Listener<Result> callback) Quartz it’s just one async method - Listenable. Future<Result> execute(Parameters params) • Advantages: - Reduces API clutter - Promotes asynchronous programming - We think you prefer async methods (we take care of executing operations on background threads) - Do you agree?

Vector Tile Layer • Optimized data format -Small in size -Can be up to

Vector Tile Layer • Optimized data format -Small in size -Can be up to 1000 times smaller that Raster Tiles -Update to data takes minutes instead of days • Because -DPI it vectors, it looks great on all devices of data not really an issue • Dynamic -Clearer, • Ability labeling more readable text - On the fly labeling for heads up display to style - Streets, Topographic, Canvas from one dataset - Day and Night mode

Mobile Map Package • Consolidates maps or basemaps into a single • Use Arc.

Mobile Map Package • Consolidates maps or basemaps into a single • Use Arc. GIS Pro 1. 2 or later to create one • Easy and fast to share • Common uses - Geocoding - Navigation • Can be used in • Navigator for Arc. GIS 2. 0 • Or any application built using Arc. GIS Runtime (Quartz Beta 2) file (. mmpk)

New Security Pattern • Authentication. Manager - • Set Authentication. Challenge. Handler - Manage

New Security Pattern • Authentication. Manager - • Set Authentication. Challenge. Handler - Manage in-memory credential cache - Set server and client certificate - Manage a set of OAuth. Configuration Default implementation of challenge handling - Token-based, HTTP/Windows, PKI - Prompt for credentials or client certificates - Trust self-signed certificate - OAuth user login - Greatly simplify authentication workflows Authentication. Manager. set. Authentication. Challenge. Handler(new

New Security Pattern No longer constructors taking Credential • • Testing with credentials -

New Security Pattern No longer constructors taking Credential • • Testing with credentials - (Because you don’t hard code credentials into your apps right? ) - Remote. Resource has set. Credential() - set before it is loaded

Quartz Demo

Quartz Demo

Agenda • Introduction to the Arc. GIS Android SDK • Maps & Layers •

Agenda • Introduction to the Arc. GIS Android SDK • Maps & Layers • Basemaps (Portal) • Location • Place Search • Routing • Authentication • Maps App • Quartz

Sessions to attend Related to Runtime and/or Android Arc. GIS Runtime SDKs: Building Offline

Sessions to attend Related to Runtime and/or Android Arc. GIS Runtime SDKs: Building Offline Apps Room 31 A Wed: 10: 15 AM - 11: 30 AM Designing a Great User Experience for Your Arc. GIS Runtime Apps Demo Theater 3 Wed: 1: 30 PM - 2: 15 PM Optimizing your Arc. GIS Runtime Apps for Performance Demo Theater 3 Wed: 2: 30 PM - 3: 15 PM Integrating Arc. GIS Runtime with Devices and Sensors Demo Theater 3 Wed: 4: 30 PM - 5: 15 PM Road Ahead: Arc. GIS Runtime SDKs Ballroom 06 E Thur: 3: 15 PM - 4: 30 PM

THANK YOU QUESTIONS

THANK YOU QUESTIONS