ArcGIS Runtime SDK for Android: Building Apps Shelly Gill
Agenda Getting started SDK Common patterns and Example Apps Android platform updates Kotlin Team goals for upcoming releases Other sessions ArcGIS Runtime: An Introduction; Editing Online and Offline, Building 3D Applications, Working with Maps Online and Offline
Getting started with ArcGIS Runtime SDK for Android apps Sign up for free Developers testing account Install free Android Studio IDE 50 credits a month, premium content, register apps, test tokens http://developer.android.com/sdk 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 Stepbystep guide Or try Dev Labs 8 so far layers, maps, scenes, features, graphics, geocoding, routing, OAuth https://developers.arcgis.com/labs/?product=android
Existing developers clone samples or example apps Clone, import, and run API samples GitHub http://github.com/esri/arcgisruntimesamplesandroid Java and Kotlin Example apps
Existing apps add AAR dependency Availble from maven repository hosted by Bintray AARs of current and previous releases Add Esri Bintray repo to your project gradle repositories { maven { url 'https://esri.bintray.com/arcgis' } Add runtime dependency to your app module gradle dependencies { implementation 'com.esri.arcgisruntime:arcgisandroid:100.4.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 https://community.esri.com/community/developers/nativeappdevelopers/arcgisruntimesdkforandroid
Sample Viewer Run samples + view code From 100.3.0 release Google Play Store Search "Esri Runtime" Or from ArcGIS Online Search "Runtime SDK Sample"
Hello world / displaymap Getting started in Android Studio https://developers.arcgis.com/android/latest/gu ide/developyourfirstmapapp.htm
Example apps Based on use cases collected from users Complete workflow apps, realworld architectures Supporting documentation Key code, data creation, app workflows, customization Open sourced on GitHub (Apache 2.0 license) Various Runtime versions
Example apps: Maps app Authentication with ArcGIS Online Cross platform pattern of authentication challenges and challenge handlers Outofthebox UI and UX Portal List organizations basemaps, using Portal, PortalQueryParameters, PortalInfo.getBasemapGalleryGroupQuery() MapView/ArcGISMap Geocoding LocatorTask geocodeasync, reversegeocodeasync, suggestasync Routing RouteTask solverouteasync
Default challenge handler with OAuthManager AuthenticationManager.setAuthenticationChallengeHandler( new DefaultAuthenticationChallengeHandler(context)); OAuthConfiguration config = new OAuthConfiguration( <Portal URL>, <Client ID>, <Redirect URI>); AuthenticationManager.addOAuthConfiguration(config);
Example apps: Nearby Places Device location workflow when map is not yet created MapView/ArcGISMap Geocoding Using GeocodeParameters.getCategories().add(...) NavigationChangedListener to refresh contextual info based on map extent
Example apps: Ecological Marine Unit MapView/ArcGISMap MobileMapPackage (.mmpk) Feature layers Querying Filtering definition expression Presents attribute information
Example apps: Offline Map Book MapView/ArcGISMap MobileMapPackage (.mmpk) Identify, Callout, PopUp Authentication with ArcGIS Online OAuth stores access and refresh tokens to CredentialCache Cache encrypted with AES and stored on device Geocoding with LocatorTask Custom offline locators on water network features with suggestions
Kotlin Official language for over a year Interoperable with Java, Java standard types Modern language features nullable types, function types, autocasting,... Open source, by JetBrains http://kotlinlang.org/docs/reference/ "27% of the top 1000 Android apps on Google Play already use Kotlin" Esri apps like Collector, Navigator etc Support in Runtime SDK Migrating samples Future plans for documentation
Kotlin and the Runtime API Simple but effective auto casting for hierarchies like geometries, layers, symbols, renderers Kotlin adds synthetic property accessors For getters/setters that follow naming patterns Does not include 'can', 'has' getters that Runtime API sometimes uses Kotlin has explicit nullable types, and nullchecks at compile time Kotlin can't get nullability info from existing libraries like Runtime API Kotlin treats these objects as 'platformtypes' may give NPE Android 9 Pie (API 28) starting to add nullability annotation in Android Framework Nullability annotations as future team goal
Demo Kotlin with Runtime API synthetic properties, autocasting, limitations
Android Platform Android platforms: connections to Google Play store 28th Sep 2018 100.3.0 release moved minimum Android SDK version support to KitKat API 19 (4.4) defaultconfig { minsdkversion 19 } Possibility of near future increase to support TLS 1.2 Can increase minsdk if required to get more functionality (language features, multiwindow etc) 26+ Oreo and newer 2425: Nougat 23: Marshmallow 2122: Lollipop 1920: KitKat 1018: Jelly Bean and older
Play Store requirements Currently Runtime has armeabiv7a and x86 native libraries Currently all 64bit devices maintain 32bit compatibility "adb shell getprop" to find out what your device supports Google introduces 64bit support for apps with native libraries by August 2019 In anticipation of future devices Affects new apps and app updates Runtime future release to include arm64v8a, x86_64 native libraries Working on updating our build processes, moving to NDK18 Internally team aim to update more quickly to targetsdkversion of latest release Following Googles recent advice and new store rules to target a release < 1 yr old
Other team goals Crossruntime functionality support Toolkit API reference Feedback on importance of different tools "since" information Kotlin support improvements Samples Java currently 113, Kotlin 11, 14 more on the way Possibility of adding Kotlin code snippets in the Guide Possibility of adding nullability annotations in future
Virtual and augmented reality with ArcGIS Runtime Enhance existing ArcGIS Runtime SDKs VR: Add stereo display rendering mode AR: Transparent background to render on video/camera feed Integration with game engines like Unity and Unreal Private beta program via Esri Early Adopter community.net, ios and Android SDKs Targeting highend mobile devices with best chipsets, high resolution, good AR/VR kits To request access to the beta program, email: ArcGISRuntimeARVRBeta@esri.com
Please Take Our Survey on the App Download the Esri Events app Select the session Scroll down to find the Complete answers and find your event you attended feedback section and select Submit
Questions? developers.arcgis.com/android developers.arcgis.com/arcgisruntime
Thank You to Our Sponsors