getting started with the arcgis smartphone runtime sdks · • arcgis for android sdk v1.0.1 •...

Post on 18-Jul-2020

22 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Getting Started with the Smartphone and Tablet ArcGIS

Runtime SDKs David Martinez, Kris Bezdecny, Andy Gup, David

Cardella

Agenda

• Intro - Trends - Overview

• ArcGIS for …

- iOS - Windows Phone - Android

• Wrap up - Q and A

Recent Trends - Mobile

Mobile internet is now the foundation for services, content, and apps

It’s mobile and wireless together

This is the new computing phase

More than Just Phones

WIRELESS

CONSUMER

CONVERGED

COMPUTING

Most Internet user will be mobile

Mobile Trends - Consumer Increased Usage of Smartphones

GIS Is Accessible to a Larger Market

Source: The Nielson Company

Feature Phones

Smartphones

U.S. Smartphone Market Penetration

%

Mobile Trends - Consumer 50% of people use maps/search on their phones

New market potential Source: Biz Tech Day

Trending towards iOS and Android Platforms

Mobile Trends - Enterprise

Enterprise usage of Smartphones and tablets on the rise

Why?

- Executives

- Bring-your-own-device

- Cost

- More control over admin

How is this affecting Mobile GIS?

• Enterprise - Extend the reach of GIS

- Improve field productivity

- Replace paper based workflows

- Make timely and accurate decisions

- Advanced analysis

- GIS to your whole organization

• Consumer - Huge market potential

- Your data/analysis to consumers

• Citizen and organizational engagement

- Volunteered Geographic Information (VGI)

Mobile Applications

ArcGIS running on …

iOS Microsoft Windows Phone

Android Windows Mobile

Windows

Rugged and Embedded Devices Smartphones and Tablets

ArcGIS on Smartphones and Tablets

iOS, Windows Phone and Android Devices

• Designed for touch-screen phones • One handed use • Connected Workflows (Wifi, 3G) • Assisted-GPS Integration • Replace Paper Surveys

- Intelligent forms - Field Validation - Media Integration

Service Requests

Parcel Valuation VGI

Campus Maps

Emergency Operations

Emergency Operations

ArcGIS on Rugged Devices

Windows and Windows Mobile Devices

• Designed for harsh field conditions • One handed/vehicle-mounted use • Occasionally connected

workflows • High accuracy data collection

- GPS integration - Laser integration

• Replace Paper Surveys - Intelligent forms - Barcode integration

Water Facilities Mapping

Asset Maintenance/Inspection

Land Management

Service Requests

Smartphone Strategy ArcGIS accessible by many

Tools to build focused solutions

iOS Windows Phone

Android

Agenda

• Overview

• ArcGIS for … - iOS - Windows Phone - Android

• Wrap up - Q and A

Getting Started with the ArcGIS Runtime SDK for iOS

Kris Bezdecny

Agenda

• What can you do with the SDK? • Layers and Web Maps • Data Collection and Editing • Development Considerations • Tips and Tricks

What can you do with the SDK?

• Service Layers - Supports multiple map projections

• Graphics - “Sketch” graphic elements on a map - Create Callouts

• Tasks - Query, Identify, and Find GIS features - Collect and modify GIS features - Locate/Geocode addresses - Geometry operations - Analytical Tasks

Sample application

Getting Started

• Intel-based Macintosh - Snow Leopard or Lion

• iOS devices - Essential for testing! - iOS 3.1.2 or higher

• Join iOS Developer Program

• Download Xcode

- Includes Apple iOS SDK

• ArcGIS Runtime SDK for iOS - Resource Center

Accessing data

• Mashup layers - Dynamic, cached, and feature layers - Secured services - Bing, Open Street Map

• Web maps - ArcGIS Online - Portal for ArcGIS

Access using the REST endpoint URL

Pattern: Add layers to the map view

Create map view

instance

Set delegate

Create layer or

web map instance

Add layer to

map view

Design map view

interface

Adding a map view

Feature layers

• Client-side layer • Feature Layer = Graphics Layer + Query Task • Inherits layer definition from the service • Modes

- On demand - Snapshot - Selection

Required for data editing

Add feature layer to map

view Create feature

Collect location

Collect attributes

Collect attachments

Commit edits to server

Pattern: Collect data

Location, attributes, and attachments can be added in any order

Editing existing data

Objective-C Considerations

• Class construction

• Passing (verbose) messages

• Manage your memory!

• Delegation and protocols

Tips-and-tricks • Learn Objective-C and Cocoa Touch

- Xcode

• Debugging - TN2239

• Performance testing - Use a physical device

• Universal apps • Human Interface Guidelines

Recommended Tech Sessions for iOS

Building Applications with ArcGIS Runtime SDK for iOS – Part I

- Wednesday, 10:30am, Catalina/Madera

Building Applications with ArcGIS Runtime SDK for iOS – Part II

- Wednesday, 1:00pm, Catalina/Madera

Getting Started with ArcGIS Runtime Windows Phone

David Martinez

Agenda

• Tools • Location • Maps • Query • Design Considerations • Performance Basics

Tools

• Windows 7 or Windows Vista with Service Pack 2 • Visual Studio 2010 • Windows Phone devices • Join App Hub • Windows Phone SDK Tools • ArcGIS Runtime SDK for Windows Phone

Location

GpsLayer GeoCoodinateWatcher

Maps and Accessing Data

• Maps and layers - Feature layers, cached and dynamic map services - Secured services - Bing, Open Street Map

• Web maps - ArcGIS Online - Portal for ArcGIS

Query

Design Considerations

Type of application Design and implementation

Resource management Remote services

Performance

OS Operating system compositing and overlays

Compositor Smooth animations for bitmap cached elements

Touch Touch responsiveness thread

Data binding. Rasterizing. Events. Very busy!

UI

App parsing logic, long-running tasks, etc.

Background

Threads

Performance Counters

• Compositor Frame Rate • UI Thread Frame Rate • Texture memory • Surface counter • Intermediate surface count • Fill Rate

Recommended Tech Sessions for Windows Phone

Building Applications with ArcGIS Runtime SDK for Windows Phone – Part I

- Wednesday, 2:45pm, Pasadena/Ventura/Sierra

Building Applications with ArcGIS Runtime SDK for Windows Phone – Part II

- Wednesday, 4:30pm, Pasadena/Ventura/Sierra

Questions?

Getting Started with ArcGIS Runtime SDK for Android

Andy Gup, Tech Lead, Esri Developer Network

@agup

Agenda – ArcGIS for Android

• Android architecture • Development basics and requirements • Common ArcGIS coding patterns

Microsoft Clip art

My demo setup

• Eclipse Indigo w/ J2EE • ArcGIS SDK for Android v1.0.1 + samples! • Android SDK v4.0.3 (API v15) • Motorola device driver for Windows 64-bit • Android Atrix running Android v2.3.6

Microsoft Clip art

Hello World

Android basic setup

ArcGIS Runtime SDK for Android

IDE Android SDK + Device Java Development Kit (JDK)

Eclipse

Android Development Workflow

Android SDK

Compile to Dalvik classes

Deploy to device/emulator

Write Java

Launch as Android app

Debug/log app

Android device

Dalvik VM

Run app

ADB Device Deamon

User Interface

Android components

App

Activity Activity View

View

View View

Service Service

Event Listeners / Handlers Event

Listeners / Handlers

Event Listeners / Handlers Data /

Content Providers

ArcGIS Application for Android

Development Basics

What do you need?

• Windows, Mac OS, or Linux! • ArcGIS for Android SDK v1.0.1 • Eclipse 3.5 (Galileo) or greater • Java JDK 6 • Android SDK v2.2 (API 8) or greater • Android Development Tools (ADT 16) • Android device! (Android v2.2) or greater • USB Device driver

Microsoft Clip art

Android SDK

http://developer.android.com

Download the SDK

http://esriurl.com/android

Android Project Overview

The main mapping component - MapView class

public class HelloWorld extends Activity { MapView map = null; /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); map = (MapView) findViewById(R.id.map); } }

http://esriurl.com/AndroidMapView

Adding map layers

map = new MapView(this); map.addLayer(new ArcGISTiledMapServiceLayer( "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer")); setContentView(map);

Tiled Map Service

map.addLayer(new ArcGISFeatureLayer(url,MODE.SNAPSHOT));

Feature Service

map.addLayer(new ArcGISDynamicMapServiceLayer( "http://.../ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer"));

Dynamic Map Service

map.addLayer(new ArcGISImageServicesLayer(url, null));

Image Service

com.esri.android.map vs. com.esri.core.map

• com.esri.android.map - Displaying, altering or removing data from the map.

• com.esri.core.map - Use when defining elements used in feature and image

services.

Microsoft Clip art

private MapView map = null;

Graphic g = new Graphic(feature.getGeometry(),redCircleSymbol);

Add data demo

Handling map events

class MyTouchListener extends MapOnTouchListener { Graphic g; // first point clicked on the map Point p0 = null; int uid = -1; public MyTouchListener(Context arg0, MapView arg1) { super(arg0, arg1); } public boolean onDragPointerMove(MotionEvent from, MotionEvent to) { if (uid == -1) { // first time g = new Graphic(null, sfs); p0 = map.toMapPoint(from.getX(), from.getY()); uid = gLayer.addGraphic(g); } else { Point p2 = map.toMapPoint(new Point(to.getX(), to.getY())); Envelope envelope = new Envelope(); envelope.merge(p0); envelope.merge(p2); gLayer.updateGraphic(uid, envelope); } return true; } ... }

Touch listeners demo

Microsoft Clip art

Editing Feature Layers

// check there have been some edits before applying the changes if (hasEdits) { // set objectID field value from graphic held in featureset attrs.put(featureLayer.getObjectIdField(), someEditedValue); Graphic newGraphic = new Graphic(null, null, attrs, null); featureLayer.applyEdits(null, null, new Graphic[] { newGraphic }, createEditCallbackListener(updateMapLayer)); }

Editing demo

Tracking Device Location

map.setOnStatusChangedListener(new OnStatusChangedListener() { private static final long serialVersionUID = 1L; public void onStatusChanged(Object source, STATUS status) { if (source == map && status == STATUS.INITIALIZED) { } } }

Location demo

Microsoft Clip art

Geoprocessing

new ViewShedQuery().execute(params); class ViewShedQuery extends AsyncTask<ArrayList<GPParameter>, Void, GPParameter[]> { @Override protected void onPostExecute(GPParameter[] result) { ... } @Override protected GPParameter[] doInBackground(ArrayList<GPParameter>... params1) { gp = new Geoprocessor(“http://www.mygisserver.com/arcgis...”); ... } }

Geoprocessing demo

Tips-and-tricks

• Test using a phone and tablet • Android Help: http://developer.android.com/ • Android Help -> User Interface Best Practices • Which Android version? Know your users! • Troubleshooting ArcGIS? Use the Android Debug Bridge

(ADB) and Logcat

Log.e("Debug", String.valueOf(_currentLocation.getLatitude()));

Recommended Tech Sessions for Android

• Advanced Development with ArcGIS API for JavaScript - Wednesday @ 10:30a, Pasadena/Ventura

• Building Applications with ArcGIS Runtime SDK for Android—Part I

- Thursday @ 8:30a, Primrose A

• Building Applications with ArcGIS Runtime SDK for Android—Part II

- Thursday @ 10:15a, Primrose A

Wrap-up

Intelligent Maps Are the New Medium Integrating Services (Data, Maps, Models…)

Support • Pop-ups • Editing • Time • Analysis • Workflows • Query

Simplifying Using ArcGIS . . . . . . Communicating Geographic Understanding to Everyone

Accessibility

Maps

Applications

Services

Maps Can Be Shared Across Devices

. . . Enhancing Access and Collaboration

One Map

Desktop

iOS

Windows Phone Android

Web Sites

Browsers

Online Services

Making Maps available to all

Deployment considerations

• Platform developer requirements

• Esri Attribution

• Esri Licensing

• Submittal

Developer Developer Requirements

• Developer account • SDK

- OS updates

• Devices • Deploying

- Development - App Store/Marketplace - Enterprise

Esri Attribution

• Attribution in About or Credits - API - Data

• Esri Logo - If using data from AGOL

Esri Licensing

• Enterprise apps deployed Internally - Requires ArcGIS Server license - Deploy unlimited number of applications

• Public Apps deployed in App Store/Marketplace/Market

- Free app - Deploy unlimited number of applications

- For fee (Sales, Ad, in-app purchases, etc…)

- Lic fee applies

Native vs Mobile Web

Native

Mobile Web

Market Penetration

Cost Effective

Functionality

User Experience

Fragmentation

Resources

• Twitter: David: @dmdevdude Andy: @agup Dave: @dcardella

• Resource Centers: http://resources.argis.com

top related