SlideShare a Scribd company logo
1 of 19
Android Development with ArcGIS Server Esri Dev Meet Up Charlotte, NC October 19th, 2010 Jim Tochterman, VP - Research & Development www.bcs-gis.com www.facebook.com/bcsgis www.twitter.com/bcsgis
What is Android? Software stack for mobile devices, formally introduced in 2008 Unlike other mobile devices, not a proprietary OS iOS Palm OS Blackberry OS Combination of three (3) components Free, open source OS for mobile devices Free, open source development environment for creating mobile applications Devices that run the Android OS and the applications created for it http://developer.android.com/guide/basics/what-is-android.html
Why choose Android over iPhone? Customers: iPhone cost was prohibitive for widespread deployment No Objective-C / Cocoa developers on staff No Mac hardware available Technical Limitations / General Annoyances: GSM coverage is not good in the Southeast (even in Urban Areas)  iPhone did not support “backgrounding” (at the time) Deployment Hurdles (App Store, Code Signing, etc.) Xcode is quite possibly the worst IDE ever! Comfort Level: If you do Flex or Java development already the tools are very similar!
Why develop with Android? Background Services Event driven model that works silently while other applications are being used. Shared Data & Inter-Process Communication Applications can exchanges messages, perform processing, and share data. Widgets & Live Folders Allows you to create windows into your applications from your device’s home screen. Application Equality No differentiation between native applications and those developed by third parties.
Pros & Cons with Android Development Pros: Good Development Tools and Samples No App Store / Market Requirement! Build and Deploy with Dropbox if you feel like it Cons: Terminology!  What in the hell is an Activity and a Intent!? (The names can seem strange, but based upon what they do) More work to make a “Pretty” app
Where Do I Get Started? Download Eclipse (or my preference MotoDev Studio) http://www.eclipse.org/downloads http://developer.motorola.com/docstools/motodevstudio/download Download Android ADT and SDK http://developer.android.com/sdk/index.html Start Playing!
Design Considerations For Mobile Devices Low Processing Speed Optimize code to run quick and efficiently Limited storage & memory Minimize application size Reuse and share data (using databases & saved files) Limited bandwidth & high latency Allow for slow, intermittent network connections Limited Battery Life Avoid expensive operations where/when possible Limit sensor access when not being used
How do I use ArcGIS Server with Android? ArcGIS API for Android is coming!  Finally!! http://resources.arcgis.com/content/arcgis-android/api
How do I use ArcGIS Server with Android now!? Sign up for the Early Adopter Program – OR - arcgis4android@esri.com Use ArcGIS Server REST API & Web Services! WMS Service provides Map Tiles for Overlays Feature Service provides ability to retrieve and/or edit data
Demo… Integrating ArcGIS Server Data & Services with Google Maps API (via REST API)
Creating Map Overlay (MainActivity.java) public class MainActivity extends MapActivity implements OnSharedPreferenceChangeListener { 	private final static String TAG = "MainActivity"; MyMapViewmyMapView; MapControllermapController; LocationManagerlocationManager;   MyCustomLocationOverlaymyLocationOverlay; WMSOverlayAtlanticStormsOverlay; 	… AtlanticStormsOverlay = new WMSOverlay("http://aws.bcs-gis.com/arcgis/services/Storms/Atlantic/MapServer/WMSServer?", layerIds, myMapView); overlays.add(AtlanticStormsOverlay ); 	… }
Creating Map Overlay (WMSOverlay.java) public class WMSOverlay extends Overlay { 	private final static String TAG = ”WMSOverlay"; WMSLoaderwmsClient; 	… 	public WMSOverlay(Stringurl, String layers, MapViewmapView) 	{ 		… wmsClient = new WMSLoader(url, layers); intleftLongitude = mapView.getMapCenter().getLongitudeE6() - mapView.getLongitudeSpan()/2; intrightLongitude = mapView.getMapCenter().getLongitudeE6()+ mapView.getLongitudeSpan()/2; intupperLatitude = mapView.getMapCenter().getLatitudeE6() + mapView.getLatitudeSpan()/2; intlowerLatitude = mapView.getMapCenter().getLatitudeE6() - mapView.getLatitudeSpan()/2; GeoPointupperLeft = new GeoPoint(upperLatitude,leftLongitude); GeoPointlowerRight = new GeoPoint(lowerLatitude,rightLongitude); image = wmsClient.loadMap(mapView.getWidth(), mapView.getHeight(), upperLeft, lowerRight); 	} }
Creating Map Overlay (WMSLoader.java) public class WMSLoader { 	public static String TAG = "WMSLoader"; 	public String serverUrl; 	public String layerIds; 	… public Bitmap loadMap(int width, int height, GeoPointul, GeoPointlr) { 	URL url = null; 	try { url = new URL(String.format(serverUrl + 		"LAYERS=" + layerIds + "&TRANSPARENT=true&FORMAT=image/	png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/	vnd.ogc.se_inimage&SRS=EPSG:4326" + "" + 		"&BBOX=%f,%f,%f,%f&WIDTH=%d&HEIGHT=%d", ul.getLongitudeE6()/1E6, lr.getLatitudeE6()/1E6, 	lr.getLongitudeE6	()/1E6, 	ul.getLatitudeE6()/1E6, width, height)); 		… 		Bitmap image = BitmapFactory.decodeStream(input); 		return image; } }
Creating Data via REST API (MainActivity.java) public class MainActivity extends MapActivity implements OnSharedPreferenceChangeListener { … 	@Override 	public booleanonCreateOptionsMenu(Menu menu)  	{ boolean result = super.onCreateOptionsMenu(menu);   		… menu.add(0, 996, Menu.NONE, "SITREP Notes").setIcon(android.R.drawable.ic_menu_myplaces); … 	} 	@Override 	public booleanonOptionsItemSelected(MenuItem item)  	{ super.onOptionsItemSelected(item); Intent mapIntent = new Intent(Intent.ACTION_VIEW);    		 switch (item.getItemId()) 		{ 			… case (996) : 			Intent dca = new Intent(this, DataCollectionActivity.class); startActivityForResult(dca, 996);    			return true; 			…    		 }     		// Return false if you have not handled the menu item.     		return false;  	}  }
Creating Data via REST API (DataCollectionActivity.java) public class DataCollectionActivity extends Activity  { 	static final String TAG = "DataCollectionActivity";  	… pointButton.setOnClickListener(newOnClickListener() {       		public void onClick(Viewv) {       			//Ask the user if they want to post report        			new AlertDialog.Builder(DataCollectionActivity.this)      			.setIcon(android.R.drawable.ic_dialog_alert)        			.setTitle("Post Note")        			.setMessage("Are you sure you want to post this note?")        			.setPositiveButton("Yes", new DialogInterface.OnClickListener() {   			        public void onClick(DialogInterface dialog, int which) {         				Bundle bundle = new Bundle(); bundle.putString("type", pointSpinner.getSelectedItem().toString()); bundle.putString("reportdatetime", deviceData.getReportDateTime()); bundle.putString("comments", commentsEditText.getText().toString()); Intent intent = new Intent(Intent.ACTION_VIEW);  intent.putExtras(bundle); intent.setClassName("com.bcs.android.sitrep", "com.bcs.android.sitrep.NoteCreateActivity"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  startActivity(intent);                    			        }        		 })       	.setNegativeButton("No", null)       	 .show();             	… }
Creating Data via REST API (NoteCreateActivity.java) public class NoteCreateActivity extends Activity { 	static final String TAG = "NoteCreateActivity";  private String serverUrl = "http://devweb.bcs-gis.com/arcgis/rest/services/SITREP_Notes2/FeatureServer/0/addFeatures"; 	… String attrString = ",'attributes':{"; attrString = attrString + "'TYPE':'" + type + "'," + "'RPTDATETIME':'" + reportdatetime + "', " + "'SUMMARY':'" + comments + "'"; attrString = attrString + "}";  	String coordString = "[{'geometry':{"; coordString = coordString + "'x':" + loc.getLongitude() + ",'y':" + loc.getLatitude(); coordString = coordString + "}" + attrString + "}]"; HttpClienthttpclient = new DefaultHttpClient(); HttpPosthttppost = new HttpPost(serverUrl);    	try {        		// Add your data        		List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1); nameValuePairs.add(newBasicNameValuePair("features", coordString)); httppost.setEntity(newUrlEncodedFormEntity(nameValuePairs));        		// Execute HTTP Post Request httpResponse = httpclient.execute(httppost); … }
Demo… Sneak Peek ofApp Built w/ ArcGIS for Android API
Questions?
Want More Information? http://developer.android.com http://resources.arcgis.com/content/arcgis-android/about WROX Book: Professional Android 2 Application Development (Meier) ISBN#: 978-0-470-56552-0 jtoch@bcs-gis.com twitter.com/jtochterman

More Related Content

What's hot

An Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsAn Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsGeilDanke
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)Nicholas Zakas
 
Goodbye, Flatland! An introduction to React VR and what it means for web dev...
Goodbye, Flatland! An introduction to React VR  and what it means for web dev...Goodbye, Flatland! An introduction to React VR  and what it means for web dev...
Goodbye, Flatland! An introduction to React VR and what it means for web dev...GeilDanke
 
What's new in Android at I/O'16
What's new in Android at I/O'16What's new in Android at I/O'16
What's new in Android at I/O'16Elif Boncuk
 
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!FITC
 
Hack'n Break Android Workshop
Hack'n Break Android WorkshopHack'n Break Android Workshop
Hack'n Break Android WorkshopElif Boncuk
 

What's hot (6)

An Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsAn Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 seconds
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
 
Goodbye, Flatland! An introduction to React VR and what it means for web dev...
Goodbye, Flatland! An introduction to React VR  and what it means for web dev...Goodbye, Flatland! An introduction to React VR  and what it means for web dev...
Goodbye, Flatland! An introduction to React VR and what it means for web dev...
 
What's new in Android at I/O'16
What's new in Android at I/O'16What's new in Android at I/O'16
What's new in Android at I/O'16
 
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!
 
Hack'n Break Android Workshop
Hack'n Break Android WorkshopHack'n Break Android Workshop
Hack'n Break Android Workshop
 

Viewers also liked

Cartographier le monde avec des outils libres
Cartographier le monde avec des outils libresCartographier le monde avec des outils libres
Cartographier le monde avec des outils libresarno974
 
Du code à la carte
Du code à la carteDu code à la carte
Du code à la cartearno974
 
Gestion municipale intelligente, moderne et accessible: Conception d'une plat...
Gestion municipale intelligente, moderne et accessible: Conception d'une plat...Gestion municipale intelligente, moderne et accessible: Conception d'une plat...
Gestion municipale intelligente, moderne et accessible: Conception d'une plat...ACSG - Section Montréal
 
Formation E-tourisme Cartographique numerique et mobilite
Formation E-tourisme Cartographique numerique et mobiliteFormation E-tourisme Cartographique numerique et mobilite
Formation E-tourisme Cartographique numerique et mobiliteSimaWay Simaway
 
ArcGIS Runtime For Android
ArcGIS Runtime For AndroidArcGIS Runtime For Android
ArcGIS Runtime For AndroidGabriel Moreira
 
Futur des Maps lafrenchmobile Octobre 2013
Futur des Maps  lafrenchmobile Octobre 2013Futur des Maps  lafrenchmobile Octobre 2013
Futur des Maps lafrenchmobile Octobre 2013servicesmobiles.fr
 
Cartographie mobile implantée au service de police de la ville de Québec
Cartographie mobile implantée au service de police de la ville de QuébecCartographie mobile implantée au service de police de la ville de Québec
Cartographie mobile implantée au service de police de la ville de QuébecACSG Section Montréal
 
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016Blue Raster
 
Android Studio, premier contact
Android Studio, premier contactAndroid Studio, premier contact
Android Studio, premier contactJasmine Conseil
 
Géolocalisation de données et conception de cartes interactives
Géolocalisation de données et conception de cartes interactivesGéolocalisation de données et conception de cartes interactives
Géolocalisation de données et conception de cartes interactivesPhilippe Gambette
 
Développement informatique : Gestion de projet, versioning, debugging, testin...
Développement informatique : Gestion de projet, versioning, debugging, testin...Développement informatique : Gestion de projet, versioning, debugging, testin...
Développement informatique : Gestion de projet, versioning, debugging, testin...ECAM Brussels Engineering School
 
Développement d’une Application Mobile Android StreetArtPlanet
Développement d’une Application Mobile Android StreetArtPlanetDéveloppement d’une Application Mobile Android StreetArtPlanet
Développement d’une Application Mobile Android StreetArtPlanet Slim Namouchi
 
Initiation arcgis10 v3-libre
Initiation arcgis10 v3-libreInitiation arcgis10 v3-libre
Initiation arcgis10 v3-libreSouhila Benkaci
 
Tout savoir sur les SIG mobiles
Tout savoir sur les SIG mobilesTout savoir sur les SIG mobiles
Tout savoir sur les SIG mobilesEric Lacoursiere
 

Viewers also liked (18)

Cartographier le monde avec des outils libres
Cartographier le monde avec des outils libresCartographier le monde avec des outils libres
Cartographier le monde avec des outils libres
 
Enp décembre 2016
Enp  décembre 2016Enp  décembre 2016
Enp décembre 2016
 
Du code à la carte
Du code à la carteDu code à la carte
Du code à la carte
 
Gestion municipale intelligente, moderne et accessible: Conception d'une plat...
Gestion municipale intelligente, moderne et accessible: Conception d'une plat...Gestion municipale intelligente, moderne et accessible: Conception d'une plat...
Gestion municipale intelligente, moderne et accessible: Conception d'une plat...
 
Formation E-tourisme Cartographique numerique et mobilite
Formation E-tourisme Cartographique numerique et mobiliteFormation E-tourisme Cartographique numerique et mobilite
Formation E-tourisme Cartographique numerique et mobilite
 
ArcGIS Runtime For Android
ArcGIS Runtime For AndroidArcGIS Runtime For Android
ArcGIS Runtime For Android
 
Futur des Maps lafrenchmobile Octobre 2013
Futur des Maps  lafrenchmobile Octobre 2013Futur des Maps  lafrenchmobile Octobre 2013
Futur des Maps lafrenchmobile Octobre 2013
 
Cartographie mobile implantée au service de police de la ville de Québec
Cartographie mobile implantée au service de police de la ville de QuébecCartographie mobile implantée au service de police de la ville de Québec
Cartographie mobile implantée au service de police de la ville de Québec
 
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
 
Arc Gis
Arc GisArc Gis
Arc Gis
 
Android Studio, premier contact
Android Studio, premier contactAndroid Studio, premier contact
Android Studio, premier contact
 
Géolocalisation de données et conception de cartes interactives
Géolocalisation de données et conception de cartes interactivesGéolocalisation de données et conception de cartes interactives
Géolocalisation de données et conception de cartes interactives
 
Développement informatique : Gestion de projet, versioning, debugging, testin...
Développement informatique : Gestion de projet, versioning, debugging, testin...Développement informatique : Gestion de projet, versioning, debugging, testin...
Développement informatique : Gestion de projet, versioning, debugging, testin...
 
Développement d’une Application Mobile Android StreetArtPlanet
Développement d’une Application Mobile Android StreetArtPlanetDéveloppement d’une Application Mobile Android StreetArtPlanet
Développement d’une Application Mobile Android StreetArtPlanet
 
Outils de gestion de projets
Outils de gestion de projetsOutils de gestion de projets
Outils de gestion de projets
 
Initiation arcgis10 v3-libre
Initiation arcgis10 v3-libreInitiation arcgis10 v3-libre
Initiation arcgis10 v3-libre
 
Formation ArcGis
Formation ArcGisFormation ArcGis
Formation ArcGis
 
Tout savoir sur les SIG mobiles
Tout savoir sur les SIG mobilesTout savoir sur les SIG mobiles
Tout savoir sur les SIG mobiles
 

Similar to Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC

Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Fafadia Tech
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Davide Cerbo
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming Enguest9bcef2f
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesOry Segal
 
Naive application development
Naive application developmentNaive application development
Naive application developmentShaka Huang
 
android level 3
android level 3android level 3
android level 3DevMix
 
The Best Way to Become an Android Developer Expert with Android Jetpack
The Best Way to Become an Android Developer Expert  with Android JetpackThe Best Way to Become an Android Developer Expert  with Android Jetpack
The Best Way to Become an Android Developer Expert with Android JetpackAhmad Arif Faizin
 
Optimizing Apps for Better Performance
Optimizing Apps for Better PerformanceOptimizing Apps for Better Performance
Optimizing Apps for Better PerformanceElif Boncuk
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Massimo Oliviero
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updatedGhanaGTUG
 
Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication developmentGanesh Gembali
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Esri Nederland
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009Christopher Judd
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Chris Griffith
 

Similar to Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC (20)

Geekcamp Android
Geekcamp AndroidGeekcamp Android
Geekcamp Android
 
Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)Introduction To Google Android (Ft Rohan Bomle)
Introduction To Google Android (Ft Rohan Bomle)
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript Vulnerabilities
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
Naive application development
Naive application developmentNaive application development
Naive application development
 
android level 3
android level 3android level 3
android level 3
 
The Best Way to Become an Android Developer Expert with Android Jetpack
The Best Way to Become an Android Developer Expert  with Android JetpackThe Best Way to Become an Android Developer Expert  with Android Jetpack
The Best Way to Become an Android Developer Expert with Android Jetpack
 
Developing in android
Developing in androidDeveloping in android
Developing in android
 
Optimizing Apps for Better Performance
Optimizing Apps for Better PerformanceOptimizing Apps for Better Performance
Optimizing Apps for Better Performance
 
Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)Advanced iOS Debbuging (Reloaded)
Advanced iOS Debbuging (Reloaded)
 
21 android2 updated
21 android2 updated21 android2 updated
21 android2 updated
 
Android TCJUG
Android TCJUGAndroid TCJUG
Android TCJUG
 
Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication development
 
Android Intro
Android IntroAndroid Intro
Android Intro
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
 
Location Based Services Without the Cocoa
Location Based Services Without the CocoaLocation Based Services Without the Cocoa
Location Based Services Without the Cocoa
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5
 

More from Jim Tochterman

Top 10 Things at Esri UC & ArcGIS Pro - Pee Dee User Group - August Meeting
Top 10 Things at Esri UC & ArcGIS Pro - Pee Dee User Group - August MeetingTop 10 Things at Esri UC & ArcGIS Pro - Pee Dee User Group - August Meeting
Top 10 Things at Esri UC & ArcGIS Pro - Pee Dee User Group - August MeetingJim Tochterman
 
What IT Professionals Should Know About Getting Started With & Supporting GIS
What IT Professionals Should Know About Getting Started With & Supporting GISWhat IT Professionals Should Know About Getting Started With & Supporting GIS
What IT Professionals Should Know About Getting Started With & Supporting GISJim Tochterman
 
What's Coming At ArcGIS 10.1 - CSRA GIS User Group Meeting
What's Coming At ArcGIS 10.1 - CSRA GIS User Group MeetingWhat's Coming At ArcGIS 10.1 - CSRA GIS User Group Meeting
What's Coming At ArcGIS 10.1 - CSRA GIS User Group MeetingJim Tochterman
 
GIS Technology & Mobile Applications - MTASC 2011 Conference
GIS Technology & Mobile Applications - MTASC 2011 ConferenceGIS Technology & Mobile Applications - MTASC 2011 Conference
GIS Technology & Mobile Applications - MTASC 2011 ConferenceJim Tochterman
 
iOS & Android Application Development - Pee Dee User Group Meeting
iOS & Android Application Development - Pee Dee User Group MeetingiOS & Android Application Development - Pee Dee User Group Meeting
iOS & Android Application Development - Pee Dee User Group MeetingJim Tochterman
 
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SCGIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SCJim Tochterman
 

More from Jim Tochterman (6)

Top 10 Things at Esri UC & ArcGIS Pro - Pee Dee User Group - August Meeting
Top 10 Things at Esri UC & ArcGIS Pro - Pee Dee User Group - August MeetingTop 10 Things at Esri UC & ArcGIS Pro - Pee Dee User Group - August Meeting
Top 10 Things at Esri UC & ArcGIS Pro - Pee Dee User Group - August Meeting
 
What IT Professionals Should Know About Getting Started With & Supporting GIS
What IT Professionals Should Know About Getting Started With & Supporting GISWhat IT Professionals Should Know About Getting Started With & Supporting GIS
What IT Professionals Should Know About Getting Started With & Supporting GIS
 
What's Coming At ArcGIS 10.1 - CSRA GIS User Group Meeting
What's Coming At ArcGIS 10.1 - CSRA GIS User Group MeetingWhat's Coming At ArcGIS 10.1 - CSRA GIS User Group Meeting
What's Coming At ArcGIS 10.1 - CSRA GIS User Group Meeting
 
GIS Technology & Mobile Applications - MTASC 2011 Conference
GIS Technology & Mobile Applications - MTASC 2011 ConferenceGIS Technology & Mobile Applications - MTASC 2011 Conference
GIS Technology & Mobile Applications - MTASC 2011 Conference
 
iOS & Android Application Development - Pee Dee User Group Meeting
iOS & Android Application Development - Pee Dee User Group MeetingiOS & Android Application Development - Pee Dee User Group Meeting
iOS & Android Application Development - Pee Dee User Group Meeting
 
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SCGIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
GIS & Cloud Computing - GAASC 2010 Fall Summit - Florence, SC
 

Recently uploaded

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC

  • 1. Android Development with ArcGIS Server Esri Dev Meet Up Charlotte, NC October 19th, 2010 Jim Tochterman, VP - Research & Development www.bcs-gis.com www.facebook.com/bcsgis www.twitter.com/bcsgis
  • 2. What is Android? Software stack for mobile devices, formally introduced in 2008 Unlike other mobile devices, not a proprietary OS iOS Palm OS Blackberry OS Combination of three (3) components Free, open source OS for mobile devices Free, open source development environment for creating mobile applications Devices that run the Android OS and the applications created for it http://developer.android.com/guide/basics/what-is-android.html
  • 3. Why choose Android over iPhone? Customers: iPhone cost was prohibitive for widespread deployment No Objective-C / Cocoa developers on staff No Mac hardware available Technical Limitations / General Annoyances: GSM coverage is not good in the Southeast (even in Urban Areas) iPhone did not support “backgrounding” (at the time) Deployment Hurdles (App Store, Code Signing, etc.) Xcode is quite possibly the worst IDE ever! Comfort Level: If you do Flex or Java development already the tools are very similar!
  • 4. Why develop with Android? Background Services Event driven model that works silently while other applications are being used. Shared Data & Inter-Process Communication Applications can exchanges messages, perform processing, and share data. Widgets & Live Folders Allows you to create windows into your applications from your device’s home screen. Application Equality No differentiation between native applications and those developed by third parties.
  • 5. Pros & Cons with Android Development Pros: Good Development Tools and Samples No App Store / Market Requirement! Build and Deploy with Dropbox if you feel like it Cons: Terminology! What in the hell is an Activity and a Intent!? (The names can seem strange, but based upon what they do) More work to make a “Pretty” app
  • 6. Where Do I Get Started? Download Eclipse (or my preference MotoDev Studio) http://www.eclipse.org/downloads http://developer.motorola.com/docstools/motodevstudio/download Download Android ADT and SDK http://developer.android.com/sdk/index.html Start Playing!
  • 7. Design Considerations For Mobile Devices Low Processing Speed Optimize code to run quick and efficiently Limited storage & memory Minimize application size Reuse and share data (using databases & saved files) Limited bandwidth & high latency Allow for slow, intermittent network connections Limited Battery Life Avoid expensive operations where/when possible Limit sensor access when not being used
  • 8. How do I use ArcGIS Server with Android? ArcGIS API for Android is coming! Finally!! http://resources.arcgis.com/content/arcgis-android/api
  • 9. How do I use ArcGIS Server with Android now!? Sign up for the Early Adopter Program – OR - arcgis4android@esri.com Use ArcGIS Server REST API & Web Services! WMS Service provides Map Tiles for Overlays Feature Service provides ability to retrieve and/or edit data
  • 10. Demo… Integrating ArcGIS Server Data & Services with Google Maps API (via REST API)
  • 11. Creating Map Overlay (MainActivity.java) public class MainActivity extends MapActivity implements OnSharedPreferenceChangeListener { private final static String TAG = "MainActivity"; MyMapViewmyMapView; MapControllermapController; LocationManagerlocationManager; MyCustomLocationOverlaymyLocationOverlay; WMSOverlayAtlanticStormsOverlay; … AtlanticStormsOverlay = new WMSOverlay("http://aws.bcs-gis.com/arcgis/services/Storms/Atlantic/MapServer/WMSServer?", layerIds, myMapView); overlays.add(AtlanticStormsOverlay ); … }
  • 12. Creating Map Overlay (WMSOverlay.java) public class WMSOverlay extends Overlay { private final static String TAG = ”WMSOverlay"; WMSLoaderwmsClient; … public WMSOverlay(Stringurl, String layers, MapViewmapView) { … wmsClient = new WMSLoader(url, layers); intleftLongitude = mapView.getMapCenter().getLongitudeE6() - mapView.getLongitudeSpan()/2; intrightLongitude = mapView.getMapCenter().getLongitudeE6()+ mapView.getLongitudeSpan()/2; intupperLatitude = mapView.getMapCenter().getLatitudeE6() + mapView.getLatitudeSpan()/2; intlowerLatitude = mapView.getMapCenter().getLatitudeE6() - mapView.getLatitudeSpan()/2; GeoPointupperLeft = new GeoPoint(upperLatitude,leftLongitude); GeoPointlowerRight = new GeoPoint(lowerLatitude,rightLongitude); image = wmsClient.loadMap(mapView.getWidth(), mapView.getHeight(), upperLeft, lowerRight); } }
  • 13. Creating Map Overlay (WMSLoader.java) public class WMSLoader { public static String TAG = "WMSLoader"; public String serverUrl; public String layerIds; … public Bitmap loadMap(int width, int height, GeoPointul, GeoPointlr) { URL url = null; try { url = new URL(String.format(serverUrl + "LAYERS=" + layerIds + "&TRANSPARENT=true&FORMAT=image/ png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/ vnd.ogc.se_inimage&SRS=EPSG:4326" + "" + "&BBOX=%f,%f,%f,%f&WIDTH=%d&HEIGHT=%d", ul.getLongitudeE6()/1E6, lr.getLatitudeE6()/1E6, lr.getLongitudeE6 ()/1E6, ul.getLatitudeE6()/1E6, width, height)); … Bitmap image = BitmapFactory.decodeStream(input); return image; } }
  • 14. Creating Data via REST API (MainActivity.java) public class MainActivity extends MapActivity implements OnSharedPreferenceChangeListener { … @Override public booleanonCreateOptionsMenu(Menu menu) { boolean result = super.onCreateOptionsMenu(menu); … menu.add(0, 996, Menu.NONE, "SITREP Notes").setIcon(android.R.drawable.ic_menu_myplaces); … } @Override public booleanonOptionsItemSelected(MenuItem item) { super.onOptionsItemSelected(item); Intent mapIntent = new Intent(Intent.ACTION_VIEW); switch (item.getItemId()) { … case (996) : Intent dca = new Intent(this, DataCollectionActivity.class); startActivityForResult(dca, 996); return true; … } // Return false if you have not handled the menu item. return false; } }
  • 15. Creating Data via REST API (DataCollectionActivity.java) public class DataCollectionActivity extends Activity { static final String TAG = "DataCollectionActivity"; … pointButton.setOnClickListener(newOnClickListener() { public void onClick(Viewv) { //Ask the user if they want to post report new AlertDialog.Builder(DataCollectionActivity.this) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle("Post Note") .setMessage("Are you sure you want to post this note?") .setPositiveButton("Yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { Bundle bundle = new Bundle(); bundle.putString("type", pointSpinner.getSelectedItem().toString()); bundle.putString("reportdatetime", deviceData.getReportDateTime()); bundle.putString("comments", commentsEditText.getText().toString()); Intent intent = new Intent(Intent.ACTION_VIEW); intent.putExtras(bundle); intent.setClassName("com.bcs.android.sitrep", "com.bcs.android.sitrep.NoteCreateActivity"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } }) .setNegativeButton("No", null) .show(); … }
  • 16. Creating Data via REST API (NoteCreateActivity.java) public class NoteCreateActivity extends Activity { static final String TAG = "NoteCreateActivity"; private String serverUrl = "http://devweb.bcs-gis.com/arcgis/rest/services/SITREP_Notes2/FeatureServer/0/addFeatures"; … String attrString = ",'attributes':{"; attrString = attrString + "'TYPE':'" + type + "'," + "'RPTDATETIME':'" + reportdatetime + "', " + "'SUMMARY':'" + comments + "'"; attrString = attrString + "}"; String coordString = "[{'geometry':{"; coordString = coordString + "'x':" + loc.getLongitude() + ",'y':" + loc.getLatitude(); coordString = coordString + "}" + attrString + "}]"; HttpClienthttpclient = new DefaultHttpClient(); HttpPosthttppost = new HttpPost(serverUrl); try { // Add your data List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1); nameValuePairs.add(newBasicNameValuePair("features", coordString)); httppost.setEntity(newUrlEncodedFormEntity(nameValuePairs)); // Execute HTTP Post Request httpResponse = httpclient.execute(httppost); … }
  • 17. Demo… Sneak Peek ofApp Built w/ ArcGIS for Android API
  • 19. Want More Information? http://developer.android.com http://resources.arcgis.com/content/arcgis-android/about WROX Book: Professional Android 2 Application Development (Meier) ISBN#: 978-0-470-56552-0 jtoch@bcs-gis.com twitter.com/jtochterman