developing android apps with the arcgis runtime sdk for ......sdk introduction - migrate existing...
TRANSCRIPT
![Page 1: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/1.jpg)
Developing Android Apps with the ArcGIS Runtime SDK for Android
Dan O’Neill @jdoneill @doneillXueming Wu @xuemingrocks
![Page 2: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/2.jpg)
Agenda
• Introduction to the ArcGIS Android SDK• Maps & Layers• Basemaps (Portal)• Location• Place Search• Routing• Authentication• Maps App• What’s next!
![Page 3: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/3.jpg)
Introduction to the ArcGIS Android SDK
![Page 4: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/4.jpg)
SDK Introduction - Features of the ArcGIS 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
![Page 5: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/5.jpg)
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○ GitHub samples
● User Forum○ GeoNet/GIS Stack Exchange
● Blogs○ Developer blogs for Android
![Page 6: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/6.jpg)
SDK Intro - How to get the SDK
● Android Studio○ Official IDE for Android development○ Based on IntelliJ 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
![Page 7: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/7.jpg)
SDK Intro - How you get the SDK
Add repository URL
Add ArcGIS Android dependency
![Page 8: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/8.jpg)
DEMOYour first android app - Hello World
![Page 9: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/9.jpg)
SDK Introduction - 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
Open Source Samples
![Page 10: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/10.jpg)
DEMOFork/Clone the Samples
![Page 11: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/11.jpg)
SDK Introduction - Migrate existing Eclipse projects
● Android Project Files○ app - application modules○ build.gradle - custom properties
● New Build System○ Gradle - Open source build
● Upgraded IDE functionality○ Android Studio - Supports Android project structure○ Migration wizard - Migrates Eclipse projects
![Page 12: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/12.jpg)
SDK Introduction - Migrate existing Eclipse projects
● Migration Prerequisites○ Eclipse ADT
■ Eclipse project has certain project files● Manifest, .project, .classpath, res/ & src/ directories
■ Comment out any references to ADT library files○ Android Studio
■ What Eclipse 3rd party plugins do you use● Search for compatible plugins in Android Studio
■ Update to the latest version of Android Studio
![Page 13: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/13.jpg)
DEMOMigrate existing Eclipse ADT projects
![Page 14: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/14.jpg)
SDK Intro - What’s in the local SDK
● doc○ API Ref - Javadoc
● legal○ license info
● libs○ dependency jars and native libs○ local ArcGIS Android SDK Library Module AAR
● res○ localization files
● resources○ Military symbol dictionaries
● samples○ archive snapshot of samples from GitHub
SDK Download
![Page 15: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/15.jpg)
SDK Intro - What’s exclusive in the local SDK
● Localization resources○ Localization of Popups
● Advanced Symbology symbol dictionaries○ APP6B and MIL2525 C symbol dictionaries
● Beta Analysis libs○ Native libs to support offline Spatial Analysis
![Page 16: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/16.jpg)
Dan O’NeillMaps & Layers
![Page 17: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/17.jpg)
Maps & Layers – Layer Types
• DynamicLayer• FeatureLayer• GraphicsLayer• GroupLayer• KmlLayer• RasterLayer• TiledLayer
![Page 18: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/18.jpg)
Maps & Layers – Dynamic Layers
• Abstract Base Class• Sub-classes
- ArcGISDynamicServiceLayer- ArcGISImageServiceLayer- WMSLayer
![Page 19: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/19.jpg)
Maps and Layers – TiledLayer
• Abstract Base Class• Direct sub-classes
- ArcGISLocalTiledLayer- TiledServiceLayer
• Indirect sub-classes- ArcGISTiledMapServiceLayer- BingMapsLayer- OpenStreetMapLayer- WMTSLayer
![Page 20: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/20.jpg)
Maps & Layers – Graphics Layer
• Layer representing one or more Graphics- Dynamically display Graphics on a MapView- Graphics can be geometries or features
• MapView can contain one or more GraphicLayers
![Page 21: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/21.jpg)
Dan O’NeillBasemaps
![Page 22: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/22.jpg)
Basemaps
● ArcGIS 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
![Page 23: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/23.jpg)
Basemaps - From Portal
● Portal ○ Provides the connection information to the Portal
● PortalInfo○ Name, logo, featured items, etc
● PortalGroup○ Represents a group in a portal
● PortalItem○ Represents an item in a portal
● PortalQueryParams○ Creates query parameters for finding content
● PortalQueryResult○ Results of the queries performed on a portal
How to get them in your app
![Page 24: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/24.jpg)
Dan O’NeillLocation
![Page 25: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/25.jpg)
Location - GPS
• Use the power of your device to show where you are• Know where you are allows apps to return smarter information back• LocationDisplayManager provides the current location
- Device location on a Map- Auto pan- Listen to events- pause- resume
![Page 26: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/26.jpg)
DEMOBASEMAP
&Location
https://github.com/Esri/arcgis-runtime-demos-android/tree/master/2015-DS/MaterialBaseMaps
![Page 27: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/27.jpg)
Place SearchXueming Wu
![Page 28: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/28.jpg)
Place Search - Geocoding
• ArcGIS Online Geocoding service- Global coverage
• Locator uses this in default constructor• Find method allows for address and POI search• LocatorFindParameters
- Set source Country- Point and radius parameters- Set Max returned location candidates
Locator.find(LocatorFindParameters)
![Page 29: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/29.jpg)
Place Search – search suggestions
• LocationSuggestionParameters- Results in radius are promoted- Sorted by distance to point- Results outside radius still returned
Locator.suggest(LocationSuggestionParameters)
![Page 30: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/30.jpg)
Place Search – Toolkit Simplification
• ArcGIS Android Toolkit API• Provides GeocodeHelper class• Find address for given location• Simplifies the workflow
- No need to set parameters and get result from a Locator
![Page 31: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/31.jpg)
DEMOPlace Search
![Page 32: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/32.jpg)
Dan O’NeillRouting
![Page 33: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/33.jpg)
Routing API - Workflow
•Create a Route Task
•Set up Route Task Parameters
•Set stops
•Calculate route
•Get results
•Display route on map
•Get directions and display to user
![Page 34: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/34.jpg)
DEMORouting
![Page 35: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/35.jpg)
Xueming WuAuthentication
![Page 36: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/36.jpg)
Authentication
• When do you need to authenticate
- Access users private content
- Create and publish content
- Access premium content on ArcGIS Online
• Authentication patterns
- Application authentication
- User logins
![Page 37: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/37.jpg)
User Logins
• Allow ArcGIS Online users to authorize your application on their
behalf
• Two steps processes:
- authorization → authorization code
- exchange code for tokens → access token and refresh token
![Page 38: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/38.jpg)
OAuth
• Have you heard about OAuth?
• Create an OAuthView in code or from xml
- portal url
- client id
- CallbackListener
• Get credentials from CallbackListener.onCallback
• Handle error in CallbackListener.onError()
• Customize the http authentication request dialog
![Page 39: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/39.jpg)
Dan O’NeillMaps App
![Page 40: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/40.jpg)
Maps App
● Material
○ Navigation Drawer
● Search Widget
● Floating Compass Button
● Fragments
○ Routing Dialog
○ Directions Dialog
○ Basemaps Dialog
![Page 41: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/41.jpg)
Maps App on GitHub
● https://github.com/Esri/maps-app-android● Get involved● Report Issues● Contribute Code
○ Fork it○ Clone it○ Configure remotes○ Send pull requests
![Page 42: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/42.jpg)
DEMOMaps App
![Page 43: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/43.jpg)
Offline support
● Take a map offline○ View○ Edit○ Sync
●Perform offline tasks○ Analysis (Beta)○ Routing/Geocoding○ Query
![Page 44: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/44.jpg)
Dan O’NeillWhat’s Next? Quartz!
![Page 45: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/45.jpg)
Quartz
• Major release- Many new capabilities- New APIs- Improved internal architecture
• Goals- Support the ArcGIS Platform- Synchronize APIs across all ArcGIS Runtime platforms- Move ArcGIS Engine developers to the ArcGIS Runtime- Support specific user workflows
![Page 46: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/46.jpg)
Agenda
• Introduction to the ArcGIS Android SDK• Maps & Layers• Basemaps (Portal)• Location• Place Search• Routing• Authentication• Maps App• What’s next!
![Page 47: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/47.jpg)
Sessions to attendRelated to Runtime and/or Android
Collaborate with the Android Runtime SDK Team
Demo Theater 11 - Developer
Wed: 9:30AM - 10:15AM
Road Ahead: ArcGIS Runtime SDK’s
Room 08 Wed: 3:15PM - 4:30PM
Developing Offline Apps with the Runtime SDK’s
Room 33A Thur: 8:30AM - 9:45AM
![Page 48: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/48.jpg)
THANK YOU
QUESTIONS
![Page 49: Developing Android Apps with the ArcGIS Runtime SDK for ......SDK Introduction - Migrate existing Eclipse projects Android Project Files app - application modules build.gradle - custom](https://reader031.vdocuments.site/reader031/viewer/2022011822/5ec6c4c1d86d6f66d6404adf/html5/thumbnails/49.jpg)