ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS...
Transcript of ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS...
![Page 1: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/1.jpg)
ArcGIS Runtime:
Building Android AppsEric Bader
![Page 2: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/2.jpg)
AgendaMore or less…
• Getting started
• API
- Common Android Runtime SDK patterns
- Common functions and workflows
• Roadmap
![Page 3: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/3.jpg)
Building ArcGIS Android Apps
ArcGIS Navigator ArcGIS Collector ArcGIS Explorer
![Page 4: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/4.jpg)
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
![Page 5: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/5.jpg)
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’
}
![Page 6: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/6.jpg)
Build your first map appAdd a MapView to Layout
app > res > layout >activity_main.xml
![Page 7: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/7.jpg)
Build your first map appSet the Map to the MapView
![Page 8: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/8.jpg)
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/
![Page 9: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/9.jpg)
Example Apps
Maps App Ecological Marine Unit Nearby Your App!
Your App Here!Your App Here!
![Page 10: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/10.jpg)
Offline MapbookExample App
![Page 11: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/11.jpg)
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
![Page 12: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/12.jpg)
API: Development Patterns
![Page 13: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/13.jpg)
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
![Page 14: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/14.jpg)
Loadable pattern
• Loadable is async
- LoadStatus
- LoadError
- Can retry or cancel loading
- Listeners
- Supports chaining of loading
![Page 15: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/15.jpg)
Loadable pattern
• loadAsync()
• getLoadStatus()
- Not_LOADED
- LOADING
- LOADED
- FAIL_TO_LOAD
• getLoadError()
• addDoneLoadingListener()
![Page 16: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/16.jpg)
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
![Page 17: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/17.jpg)
ListenableFutureSample – Identify-graphics-hittest
![Page 18: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/18.jpg)
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
![Page 19: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/19.jpg)
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
![Page 20: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/20.jpg)
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
![Page 21: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/21.jpg)
Loadable pattern
• Intro
• Developer Patterns
• Functional Overview of the SDK
• SDK Components through Apps
• Roadmap
![Page 22: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/22.jpg)
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
![Page 23: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/23.jpg)
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
![Page 24: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/24.jpg)
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
![Page 25: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/25.jpg)
DefaultAuthenticationChallengeHandler
AuthenticationManager.setAuthenticationChallengeHandler(
new DefaultAuthenticationChallengeHandler(context));
![Page 26: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/26.jpg)
2018
Roadmap
![Page 27: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/27.jpg)
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
![Page 28: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/28.jpg)
HUGE
DISCLAIMER:
The following content is subject to change
![Page 29: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/29.jpg)
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
![Page 30: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/30.jpg)
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
![Page 31: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/31.jpg)
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
![Page 32: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/32.jpg)
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
![Page 33: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/33.jpg)
Thank you!
![Page 34: ArcGIS Runtime: Building Android Apps · -Android Studio-Free ArcGIS developer account-ArcGIS Runtime SDK for Android •ArcGIS Runtime SDK for Android supports a wide range of mapping](https://reader031.fdocuments.in/reader031/viewer/2022013003/5fdc47fd684c5308ad21354e/html5/thumbnails/34.jpg)