ArcGIS Runtime SDK for Android: Building Apps. Shelly Gill

Similar documents
ArcGIS Runtime SDK for Android: Building Apps. Shelly Gill

ArcGIS Runtime SDK for Android An Introduction. Xueming

ArcGIS Runtime SDK for Java: Building Apps. Tyler Schiewe

ArcGIS Runtime SDK for Java: Building Apps. Mark Baird

ArcGIS Runtime SDK for.net Building Apps. Antti Kajanus David Cardella

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

Building Android Apps Runtime SDK for Android

ArcGIS Runtime SDK for ios and macos: Building Apps. Suganya Baskaran, Gagandeep Singh

ArcGIS Runtime SDK for.net Getting Started. Jo Fraley

ArcGIS Runtime SDK for Java: A Beginner s Guide. Mark Baird JC Malott

Developing mapping applications with ArcGIS Runtime SDK for ios. Divesh Goyal Eric Ito

Getting Started with ArcGIS Runtime SDK for Java SE

Hit the Ground Running. ArcGIS Runtime SDK for Android

ArcGIS Runtime: Working with Maps Online and Offline. Will Crick Justin Colville [Euan Cameron]

Building Apps with the ArcGIS Runtime SDK for ios

Android Application Development using Kotlin

ArcGIS Runtime SDKs Building Offline Apps. Nick Furness

Web AppBuilder Presented by

ArcGIS Runtime: Building Cross-Platform Apps. Rex Hansen Mark Baird Michael Tims Morten Nielsen

ArcGIS Runtime SDK for.net Building Apps. Rex Hansen

ArcGIS Runtime SDK for.net: Building Xamarin Apps. Rich Zwaap Thad Tilton

Integrate GIS Functionality into Windows Apps with ArcGIS Runtime SDK for.net

Building Java Apps with ArcGIS Runtime SDK

ArcGIS Runtime SDKs: Building a Routing Application. Frank Kish Konstantin Kutsner

Creating Web Mapping Applications. Nikki Golding

ArcGIS Runtime SDK for Qt: Building Apps. Koushik Hajra and Lucas Danzinger

Developers Road Map to ArcGIS Desktop and ArcGIS Engine

ArcGIS Enterprise: Portal Administration BILL MAJOR CRAIG CLEVELAND

Best Development Practices and Patterns Using ArcGIS Runtime SDK for Android. Xueming Wu Puneet Prakash

BlackBerry Developer Global Tour. Android. Table of Contents

Getting Started with ArcGIS Runtime SDK for the Microsoft.NET Framework. Morten Nielsen Mike Branscomb Antti Kajanus Rex Hansen

Web AppBuilder for ArcGIS: JavaScript Apps Made Easy

Building Applications with the ArcGIS Runtime SDK for WPF

Building Applications with ArcGIS Runtime SDK for Android Part II. Will Crick Dan O Neill

Configuring and Customizing the ArcGIS Viewer for Silverlight. Katy Dalton

Building Applications with ArcGIS Runtime SDK for ios - Part I. Divesh Goyal Mark Dostal

ArcGIS Viewer for Flex An Introduction

Sharing Web Layers and Services in the ArcGIS Platform. Melanie Summers and Ty Fitzpatrick

ArcGIS Runtime SDK for WPF

TRAINING GUIDE. Mobile for Administrators Part 3 - GIS

TRAINING GUIDE. Tablet: Cradle to Mobile GIS

Collaborate. w/ ArcGIS Runtime SDK for Android

Administering Your ArcGIS Enterprise Portal Bill Major Craig Cleveland

Developing Mobile Apps with the ArcGIS Runtime SDK for.net

ArcGIS Apps for the Mobile Worker. Presented by: Sue Enyedy-Goldner

ArcGIS Runtime: Building 3D Apps. Rex Hansen Adrien Meriaux

Building WPF Apps with the new ArcGIS Runtime SDK for.net. Antti Kajanus Mike Branscomb

Introducing Survey123 For ArcGIS

ArcGIS Apps for the Mobile Worker. Presented by: Sue Enyedy-Goldner

ArcGIS Runtime: Building Cross-Platform Apps. Mike Branscomb Michael Tims Tyler Schiewe

Enabling High-Quality Printing in Web Applications. Tanu Hoque & Jeff Moulds

ArcGIS Apps for the Mobile Worker. Presented by: Sue Enyedy-Goldner

ArcGIS Viewer for Silverlight Advanced Topics

Automation with Meraki Provisioning API

Essentials of Developing Windows Store Apps Using C#

ArcGIS App Strategies Ben

ArcGIS Enterprise Security: An Introduction. Gregory Ponto & Jeff Smith

Developing Qt Apps with the Runtime SDK

Developing Add-Ins for ArcGIS Pro (.NET) Toronto Esri Canada UC Presented by: Gandhar Wazalwar & Kern Ranjitsingh October 11, 2018

Introduction to Web AppBuilder for ArcGIS: JavaScript Apps Made Easy

Developing ios & Mac apps with ArcGIS Runtime SDK. Suganya Baskaran, Divesh Goyal

Getting Started with the Smartphone and Tablet ArcGIS Runtime SDKs. David Martinez, Kris Bezdecny, Andy Gup, David Cardella

Getting Started ArcGIS Runtime SDK for Android. Andy

Fen Wetland Toolkit. Mobile Application User Guide Version 1.0. September 27, Contact:

Running the ESPM Twitter Integration sample app on SAP Cloud Platform

No Programming Required Create web apps rapidly with Web AppBuilder for ArcGIS

Copyright

Leveraging the Globus Platform in your Web Applications. GlobusWorld April 26, 2018 Greg Nawrocki

TRAINING GUIDE. Tablet Cradle to Mobile GIS

Esri Developer Summit in Europe Building Applications with ArcGIS Runtime SDK for Java

Collector for ArcGIS Preparing for and Working in a disconnected environment

Implementing Security for ArcGIS Server Java Solutions

Introduction To Android

Building Desktop Applications with Java. Eric Bader Vishal Agarwal

Building Mobile Apps with the ArcGIS API for JavaScript. Andy Gup, Lloyd Heberlie, Thomas Other

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals

Developing Web Applications with Geocoding and Routing Services Using ArcGIS Online. Deelesh Mandloi Dmitry Kudinov Brad Niemand

ArcGIS Online: Three-and-a-Half Ways to Create Tile Layers. Eric Anderson & Adam Eversole Esri Support Services

ArcGIS Online A Security, Privacy, and Compliance Overview. Andrea Rosso Michael Young

Portal for ArcGIS. Matthias Schenker, Esri Switzerland

BlackBerry Developer Summit. A02: Rapid Development Leveraging BEMS Services and the AppKinetics Framework

PROCE55 Mobile: Web API App. Web API.

Android Sdk Install Documentation Eclipse. Ubuntu >>>CLICK HERE<<<

Essentials of Developing Windows Store Apps Using HTML5 and JavaScript

Getting Started with ArcGIS Runtime SDK for Qt. Thomas Dunn & Nandini Rao

DEVELOPING APPS FOR. Note: This ebook relies on and uses information from the Google Glass Developers site.

Getting Started with ArcGIS Runtime SDK for ios. Nick Furness / Al Pascual

Mobile Application Development

User Interfaces for Web Sites and Mobile Devices. System and Networks

TRAINING GUIDE. ArcGIS Online and Lucity

What is Android? Android is an open-source operating system (OS) used in smart devices

MAPS.ME. User Guide.

Google Maps Troubleshooting

Getting Started with the ArcGIS API for JavaScript. Julie Powell, Paul Hann

A Developers Guide To Mobile GIS. David Cardella, Jeff Shaner

ArcGIS Online: Developing Web Applications with Geocoding and Routing Services. Deelesh Mandloi Dmitry Kudinov Brad Niemand

System Design and Tuning

Collector for ArcGIS

ArcGIS API for JavaScript: Getting Started Andy René

Transcription:

ArcGIS Runtime SDK for Android: Building Apps Shelly Gill

Agenda Getting started API - Android Runtime SDK patterns - Common functions, workflows The Android platform Other sessions covered Runtime SDK generally: An Introduction to the API and Architecture, Building 3D Applications, Working with Maps Online and Offline

Getting started With a tutorial, gradle, or samples

Getting started with the SDK 1. Sign up for free Developers testing account - 50 credits a month, premium content, register apps, test tokens 2. Install free Android Studio IDE - http://developer.android.com/sdk 3. Get dependencies automatically with Gradle and try it out - Write an app!

New developers - Follow first map app tutorial Developers site > Android > Guide - http://developers.arcgis.com/android/latest/guide - Help topics Getting started > Develop your first map app Step-by-step guide Or try Dev Labs - 8 so far - https://developers.arcgis.com/labs/develop/index.html#android

Existing developers - clone samples or example apps GitHub - https://github.com/esri API samples - Java, and adding Kotlin - http://github.com/esri/arcgis-runtime-samples-android Example apps Clone/checkout/download, import, and run

Existing apps - add AAR dependency Maven repository hosted by Bintray - AARs of current and previous releases Project build.gradle repositories { maven { url 'https://esri.bintray.com/arcgis' } App module build.gradle dependencies { compile 'com.esri.arcgisruntime:arcgis-android:100.1.0' }

SDK resources Developers site - http://developers.arcgis.com/android - Doc guide, API Reference - Downloadable SDK - Application support GitHub for samples and example apps GeoNet user communities - http://geonet.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-forandroid - https://community.esri.com/groups/arcgis-example-apps

Example apps Real world apps based on use cases collected from users Complete working apps with detailed instructions for getting started Supporting documentation - code, data creation, app workflows, customization Open sourced on GitHub (Apache 2.0 license) Current Android apps: - Maps App, Ecological Marine Units, Nearby Places, Offline Mapbook Future apps: - Mobile data collection, Situational awareness - Vote at https://community.esri.com/polls/2636

Functionality Build apps for Android devices Visualize geographic data maps, scenes, layers, graphics - feature, dynamic, tiled, raster, Identify features, query data, and display info pop-ups Share maps and content across ArcGIS platform Offline maps, data, routing, geocoding Powerful analysis and local geometric operations https://developers.arcgis.com/android/latest/guide/essential-vocabulary.htm

API

ListenableFuture pattern Asynchronous methods use ListenableFuture - Inherits from java Future interface - A promise to return a result - Add done listener, or call get (blocking) Can simplify asynchronous programming - Done called back on UI thread if listener added on UI thread - We take care of executing operations on background threads - Standard pattern for cancellation, errors

ListenableFuture Sample identify-graphics-hittest

// Get future ListenableFuture<Boolean> = mmapview.setviewpointasync(firstviewpoint, 3); // Add done listener booleanlistenablefuture.adddonelistener(new Runnable() { @Override public void run() { try { // get result of the future if (MainActivity.this.booleanListenableFuture.get()) { // Proceed with more mmapview.setviewpointasync(secondviewpoint, 3); } } catch (InterruptedException ie) { // user interrupted the operation } catch (ExecutionException ee) { // a problem with executing the call or returning result } } });

ListenableList pattern Bind to data Add listener to know when content changes - Adds and removes Implemented on - Graphics in a GraphicsOverlay - LayerList (operational, base, reference layers) - Sublayers in SublayerList - Bookmarks

Loadable pattern Java implementation Loadable resources - Maps, layers, portal item, geodatabase, Does not use ListenableFuture - Specific pattern for load errors - Has additional states - Can reload if failed Loads dependent loadables https://developers.arcgis.com/android/latest/guide/loadable-pattern.htm

Map and MapView Content and presentation are separated ArcGISMap - separate class that defines content - Listenable lists of Layer, Bookmark - MapView references ArcGISMap - Open a map, or build in code, modify, save to portal MapView extends android.view.viewgroup - GraphicsOverlay(s), LocationDisplay, - Control visible extent of ArcGISMap using Viewpoints Don't forget andoid.permission.internet for any online layers, basemaps, portals, etc

Scene and SceneView New in Android at v100.1 ArcGISScene content - SceneView references ArcGISScene - Basemap, ElevationSurface, Layers, - Build in code SceneView extends android.view.viewgroup - Control view using Viewpoints and Cameras Currently requires OpenGL2.0 - Covers all devices connecting to Google Play

Scene and layer Code Display a scene Add elevation surface Add a scene layer

// create a scene and add a basemap to it ArcGISScene scene = new ArcGISScene(); scene.setbasemap(basemap.createimagery()); msceneview = findviewbyid(r.id.sceneview); msceneview.setscene(scene); // create an elevation source, and add this to the base surface of the scene ArcGISTiledElevationSource elevationsource = new ArcGISTiledElevationSource(getResources().getString(R.string.elevation_source)); scene.getbasesurface().getelevationsources().add(elevationsource); // add a scene service to the scene for viewing buildings ArcGISSceneLayer scenelayer = new ArcGISSceneLayer( getresources().getstring(r.string.buildings_service)); scene.getoperationallayers().add(scenelayer); // add a camera and initial camera position Camera camera = new Camera(48.378, -4.494, 200, 345, 65, 0); msceneview.setviewpointcamera(camera);

Display device location Uses Android platform location providers - GPS and network location, if enabled Customizable appearance AutoPan behavior pan, rotate - Navigation (car) - CompassNavigation (waypoint) - Recenter (no rotation) LocationDisplay - MapView.getLocationDisplay() - LocationDisplay.startAsync() Only Position Position & Heading Position & Course

LocationDisplay top tips Don t forget - android.permission.access_coarse_location + - android.permission.access_fine_location User interactive navigation cancels auto-pan - MapView.addNavigationChangedListener when isnavigating returns to false, re-set the AutoPanMode - Or disable interactive navigation User interactive navigation can also change scale - Again can use addnavigationchangedlistener and re-set map scale if required Can create own LocationDataSource if required

Handling touch on the map Default navigation gestures - Swipe to pan - Double-tap = zoom in, two-finger-tap = zoom out - Pinch to zoom and rotate - Tap and hold then swipe up/down for continuous zoom Change interactive navigation by creating custom touch listener - Inherit from DefaultMapViewOnTouchListener - Implement View.OnTouchListener

Handling gestures Sample identify-graphics-hittest

Integration with the ArcGIS Platform using Portal API Portal - Connection to ArcGIS Online or an on-premises Portal - Authenticated and anonymous access PortalUser - Current authenticated user or other users PortalItem - Represent any item type - Create, update, delete items and PortalFolders - Share publicly, organization, or PortalGroup

MobileMapPackage Provide offline maps so users can be productive when network connectivity is poor or nonexistent MobileMapPackage class - maps, layers, data, locators, transportation networks Desktop pattern - Create MMPK in Pro Services pattern - Use OfflineMapTask ArcGIS Runtime SDKs: Working with Maps Online and Offline 2pm - B 07 - B 08

Offline Mapbook Example App Offline Mapbook Example App

Authentication default challenge handler Cross-platform security pattern - Challenges, challenge handlers, OAuth2, tokens DefaultAuthenticationChallengeHandler - Out of the box UX for challenges - Network credential: HTTP secured service / Integrated Windows Authentication (IWA). - ArcGIS Tokens: proprietary token-based authentication - PKI certificates - Self signed certificates Create own handler if required - Implement AuthenticationChallengeHandler

Security pattern OAuth 2.0 Used by ArcGIS Online OAuthConfiguration - Provides challenge handling specifically for OAuth - Uses default Android browser app to display login UX Set this up - Create Application - Developers site account - Set DefaultAuthenticationChallengeHandler - Create OAuthConfiguration

Authentication code Maps App example app: AuthenticationManager DefaultAuthenticationChallengeHandler OAuthConfiguration

Android Platform

Android Platform Android platforms: connections to Google Play store 2 nd Oct 2017 Runtime SDK supports minimum Android API 16 ( Jelly Bean Android 4.1) defaultconfig { minsdkversion 16 } No need for separate JDK What about your deployments? - API 16 (Jelly Bean)? - API 19 (Kit Kat)? - API 24 Nougat or forward Nougat + Oreo Marshmallow Lollipop KitKat Jelly Bean Older

Android Studio 3 Significant update to Android Studio - IDE - Parameter hints, semantic highlighting - Tooling Debugging, Instant Apps templates, Android Profiler, new gradle plugin + optimizations Release Candidate 2 Oct 19 th Final released last night! Java 8 language features as standard Migrate projects forward from 2.3.3 release Supports Kotlin

Kotlin New official language - Interoperable with Java, Java standard types - Open source, by JetBrains - http://kotlinlang.org/docs/reference/ Modern language features - Null safety/nullable types, default parameter values - Lambdas, inferred properties, higher order functions + function types, auto-casting Support in Runtime SDK - Migrating samples - Future plans for documentation - Example apps - ask at https://community.esri.com/groups/arcgis-exampleapps/content?filterid=contentstatus%5bpublished%5d~objecttype~objecttype%5bthread%5d

In conclusion Free to get going - Android Studio - Free Developers account for testing - ArcGIS Runtime SDK for Android Runtime SDK support for wide range of functionality and workflows GeoNet questions, discussions, suggestions Feedback in the conference app

Thank You to Our Generous Sponsor