Building Native Apps with Arc GIS API for
Building Native Apps with Arc. GIS API for Java. Script Using Phone. Gap and j. Query Andy Gup, Lloyd Heberlie
Agenda • Intro • Esri to Phone. Gap Quickstart • Putting • Native it all together build environment • Additional information
Why Phone. Gap? • Mobile cross-browser access to these and more: SDCard - Camera - Accelerometer - Contacts - Battery status - Ability to put Java. Script app in Google Play, App Store and Windows Phone Store -
Basic Phone. Gap app Lloyd Heberlie
What is Phone. Gap? • Application container technology • Core engine is 100% open source • Web view container, plus JS API • HTML 5, CSS 3, JS = Native App Phone. Gap
Phone. Gap architecture Phone. Gap Plugins Phone. Gap Application Code Native App
Setup a developer machine Code quality and verification web server Source Control
Phone. Gap Quickstart Lloyd Heberlie
Debugging
Putting it all together Phone. Gap, j. Query and Arc. GIS API for Java. Script Andy Gup
Single Page view Set up page structure Apply CSS, roles and themes https: //github. com/Esri/quickstart-map-phonegap https: //github. com/Esri/jquery-mobile-map-js
Single Page Map - HTML
Single Page Map - HTML
Single Page Map - HTML
Single Page Map - CSS
Single page app Andy Gup
Auto-recenter after orientation change
j. Query Helper library Recentering on device rotation Multiple view mapping apps var helper = new j. Query. Helper(map); https: //github. com/Esri/jquery-mobile-map-js
Auto-recenter after orientation change
A quick look: Android native build environment
assets/www/
Host JS libs locally (if possible)
Set Phone. Gap config. xml
Native wrapper
Putting it all together Andy Gup
GPS Best Practices - Android
GPS Best Practices - Android
GPS Best Practices - i. OS
GPS Best Practices – Windows Phone
Geolocation API – same as always!
Requirements for offline? App usage in areas of intermittent or no internet Ability to reload or restart app in areas of intermittent or no connectivity Lightweight cross-browser functionality Github. com/esri/Offline-editor-js
Offline JS Use Cases • Viewing simple maps • Lighweight data collection VGI - Simple editing - • Devices laptop - smartphone / tablet -
Need a full featured, robust offline solution? Arc. GIS Runtimes for i. OS, Android, Qt and. NET! Includes integrated support for offline editing and synchronization. Also fully supports related tables, sub-types, domains and much more.
Offline Demo – trailyelper
Questions? Andy Gup Developer Evangelist Team agup@esri. com @agup Lloyd Heberlie Java. Script API Team lheberlie@esri. com @lheberlie
- Slides: 36