Social network Twitter Hashtag: #m2eu #android Personal twitter: @rallat  Israel Ferrer - @rallat – israel@bubiloop.com
Who am I?  Israel Ferrer Camacho co-founder  and.roid.es  &  bubiloop.com Business Developer at  bubiloop.com Android Developer Trovit homes:  http://bblp.to/10rN and.roid.es news:  http://bblp.to/11E6 Rac1:  http://bblp.to/10uh Bubiloop recommender:  http://bblp.to/11Hg   Working on salir.com app Israel Ferrer - @rallat – israel@bubiloop.com
And.roid.es 10/08 Israel Ferrer - @rallat - israel@bubiloop.com
And.roid.es meetup 06/09 Israel Ferrer - @rallat - israel@bubiloop.com
Campus Party 08/09 Israel Ferrer - @rallat - israel@bubiloop.com
Android workshops 09/10 Israel Ferrer - @rallat – israel@bubiloop.com
Bubiloop 10/09 Israel Ferrer - @rallat – israel@bubiloop.com
Androides Barcelona 2010 Co-founder of Barcelona Android dev group  Israel Ferrer - @rallat – israel@bubiloop.com
Mobile Cocktail 02/10  Israel Ferrer - @rallat – israel@bubiloop.com
Google I/O 2010 Israel Ferrer - @rallat – israel@bubiloop.com
Location and Maps in Android Israel Ferrer Camacho June 17, 2010 Israel Ferrer - @rallat – israel@bubiloop.com
developer.android.com Israel Ferrer - @rallat – israel@bubiloop.com
Agenda Google Maps in Android Location in Android Show me the code Questions Israel Ferrer - @rallat – israel@bubiloop.com
Google Maps in Android Google Maps is an external library to the Android SDK. Israel Ferrer - @rallat – israel@bubiloop.com Features Google Maps Google Maps Android World Maps Mode Sat/Street View/Traffic Places content Compass
Google Maps in Android GeoPoint:  longitude/latitude stored as integer in microdegrees (degrees * 1E6) Overlay:  Base class representing an overlay which may be displayed on top of a map OverlayItem:  The basic component of any ItemizedOverlay. ItemizedOverlay : A base class for an Overlay which consists of a list of OverlayItems Israel Ferrer - @rallat – israel@bubiloop.com
Google Maps in Android MapActivity:  Base class with code to manage the boring necessities of any activity that displays a MapView MapView:  A View which displays a map (with data obtained from the Google Maps service). MapController:  A utility class to manage panning and zooming of a map. MyLocationOverlay:  An Overlay for drawing the user's current location (and accuracy) on the map, and/or a compass-rose inset. Israel Ferrer - @rallat – israel@bubiloop.com
Google Maps in Android ¿ What? We can show custom markers with info at someplace in a map ¿How? Prerequisites Show the map using MapView Create our custom marker class MapActivity: Add marker to our located overlays Add this located overlays to our MapView Israel Ferrer - @rallat – israel@bubiloop.com
Prerequisites Create an Android project with Google APIs support Israel Ferrer - @rallat – israel@bubiloop.com
Prerequisites Manifest Permissions: Add permission to use Google Maps external library <uses-library android:name=&quot;com.google.android.maps&quot; /> Add permission to use Internet  <uses-permission android:name=&quot;android.permission.INTERNET&quot; /> Google Maps API key for mobile: http://tinyurl.com/androidkeyapi Israel Ferrer - @rallat – israel@bubiloop.com
MapView XML Definition MapView   Israel Ferrer - @rallat – israel@bubiloop.com
MapActivity Create MapActivity to show the MapView Israel Ferrer - @rallat – israel@bubiloop.com
MyLocationOverlay This object create an overlay that shows your location.
Custom Marker Object that extends ItemizedOverlay Object is initialize with a Drawable our custom marker
Custom Marker Populate our custom marker ItemizedOverlay with OverlayItems Finally, add our custom marker Overlay to MapView Overlays
Hello Map! Israel Ferrer - @rallat – israel@bubiloop.com
To Sum Up Israel Ferrer - @rallat – israel@bubiloop.com
Location in Android ¿ What? Location-based services are technique to figure out where you are ¿How? Prerequisites Location Manager Location Listener Israel Ferrer - @rallat – israel@bubiloop.com
Prerequisites Manifest Permissions GPS Location <uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot;/> Network Location <uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot;/> Israel Ferrer - @rallat – israel@bubiloop.com
Location Manager Location-Based Services (LBS) are handle using the LocationManager Two Location providers in Android: GPS, Network Define Criteria object to obtain the best provider Israel Ferrer - @rallat – israel@bubiloop.com
Location Manager One we get the best provider is time to get location Get last know location Get the location changes Request Location Manager this updates Israel Ferrer - @rallat – israel@bubiloop.com
Location Listener Used for receiving notifications from the LocationManager when the location has changed Israel Ferrer - @rallat – israel@bubiloop.com
To Sum Up Israel Ferrer - @rallat – israel@bubiloop.com
Maps and Location Easy to use in your apps Once we’ve got the location, we can show data on the map just with the method update(location) to refresh de UI Israel Ferrer - @rallat – israel@bubiloop.com
Q&A All the source from this session is in http://bblp.to/mobile20 Questions? Israel Ferrer - @rallat – israel@bubiloop.com
Thanks Twitter:  @rallat Mail:  israel@bubiloop.com Projects:  bubiloop.com & and.roid.es Israel Ferrer - @rallat - israel@bubiloop.com

Google Maps in Android

  • 1.
    Social network TwitterHashtag: #m2eu #android Personal twitter: @rallat Israel Ferrer - @rallat – israel@bubiloop.com
  • 2.
    Who am I? Israel Ferrer Camacho co-founder and.roid.es & bubiloop.com Business Developer at bubiloop.com Android Developer Trovit homes: http://bblp.to/10rN and.roid.es news:  http://bblp.to/11E6 Rac1: http://bblp.to/10uh Bubiloop recommender: http://bblp.to/11Hg Working on salir.com app Israel Ferrer - @rallat – israel@bubiloop.com
  • 3.
    And.roid.es 10/08 IsraelFerrer - @rallat - israel@bubiloop.com
  • 4.
    And.roid.es meetup 06/09Israel Ferrer - @rallat - israel@bubiloop.com
  • 5.
    Campus Party 08/09Israel Ferrer - @rallat - israel@bubiloop.com
  • 6.
    Android workshops 09/10Israel Ferrer - @rallat – israel@bubiloop.com
  • 7.
    Bubiloop 10/09 IsraelFerrer - @rallat – israel@bubiloop.com
  • 8.
    Androides Barcelona 2010Co-founder of Barcelona Android dev group Israel Ferrer - @rallat – israel@bubiloop.com
  • 9.
    Mobile Cocktail 02/10 Israel Ferrer - @rallat – israel@bubiloop.com
  • 10.
    Google I/O 2010Israel Ferrer - @rallat – israel@bubiloop.com
  • 11.
    Location and Mapsin Android Israel Ferrer Camacho June 17, 2010 Israel Ferrer - @rallat – israel@bubiloop.com
  • 12.
    developer.android.com Israel Ferrer- @rallat – israel@bubiloop.com
  • 13.
    Agenda Google Mapsin Android Location in Android Show me the code Questions Israel Ferrer - @rallat – israel@bubiloop.com
  • 14.
    Google Maps inAndroid Google Maps is an external library to the Android SDK. Israel Ferrer - @rallat – israel@bubiloop.com Features Google Maps Google Maps Android World Maps Mode Sat/Street View/Traffic Places content Compass
  • 15.
    Google Maps inAndroid GeoPoint: longitude/latitude stored as integer in microdegrees (degrees * 1E6) Overlay: Base class representing an overlay which may be displayed on top of a map OverlayItem: The basic component of any ItemizedOverlay. ItemizedOverlay : A base class for an Overlay which consists of a list of OverlayItems Israel Ferrer - @rallat – israel@bubiloop.com
  • 16.
    Google Maps inAndroid MapActivity: Base class with code to manage the boring necessities of any activity that displays a MapView MapView: A View which displays a map (with data obtained from the Google Maps service). MapController: A utility class to manage panning and zooming of a map. MyLocationOverlay: An Overlay for drawing the user's current location (and accuracy) on the map, and/or a compass-rose inset. Israel Ferrer - @rallat – israel@bubiloop.com
  • 17.
    Google Maps inAndroid ¿ What? We can show custom markers with info at someplace in a map ¿How? Prerequisites Show the map using MapView Create our custom marker class MapActivity: Add marker to our located overlays Add this located overlays to our MapView Israel Ferrer - @rallat – israel@bubiloop.com
  • 18.
    Prerequisites Create anAndroid project with Google APIs support Israel Ferrer - @rallat – israel@bubiloop.com
  • 19.
    Prerequisites Manifest Permissions:Add permission to use Google Maps external library <uses-library android:name=&quot;com.google.android.maps&quot; /> Add permission to use Internet <uses-permission android:name=&quot;android.permission.INTERNET&quot; /> Google Maps API key for mobile: http://tinyurl.com/androidkeyapi Israel Ferrer - @rallat – israel@bubiloop.com
  • 20.
    MapView XML DefinitionMapView   Israel Ferrer - @rallat – israel@bubiloop.com
  • 21.
    MapActivity Create MapActivityto show the MapView Israel Ferrer - @rallat – israel@bubiloop.com
  • 22.
    MyLocationOverlay This objectcreate an overlay that shows your location.
  • 23.
    Custom Marker Objectthat extends ItemizedOverlay Object is initialize with a Drawable our custom marker
  • 24.
    Custom Marker Populateour custom marker ItemizedOverlay with OverlayItems Finally, add our custom marker Overlay to MapView Overlays
  • 25.
    Hello Map! IsraelFerrer - @rallat – israel@bubiloop.com
  • 26.
    To Sum UpIsrael Ferrer - @rallat – israel@bubiloop.com
  • 27.
    Location in Android¿ What? Location-based services are technique to figure out where you are ¿How? Prerequisites Location Manager Location Listener Israel Ferrer - @rallat – israel@bubiloop.com
  • 28.
    Prerequisites Manifest PermissionsGPS Location <uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot;/> Network Location <uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot;/> Israel Ferrer - @rallat – israel@bubiloop.com
  • 29.
    Location Manager Location-BasedServices (LBS) are handle using the LocationManager Two Location providers in Android: GPS, Network Define Criteria object to obtain the best provider Israel Ferrer - @rallat – israel@bubiloop.com
  • 30.
    Location Manager Onewe get the best provider is time to get location Get last know location Get the location changes Request Location Manager this updates Israel Ferrer - @rallat – israel@bubiloop.com
  • 31.
    Location Listener Usedfor receiving notifications from the LocationManager when the location has changed Israel Ferrer - @rallat – israel@bubiloop.com
  • 32.
    To Sum UpIsrael Ferrer - @rallat – israel@bubiloop.com
  • 33.
    Maps and LocationEasy to use in your apps Once we’ve got the location, we can show data on the map just with the method update(location) to refresh de UI Israel Ferrer - @rallat – israel@bubiloop.com
  • 34.
    Q&A All thesource from this session is in http://bblp.to/mobile20 Questions? Israel Ferrer - @rallat – israel@bubiloop.com
  • 35.
    Thanks Twitter: @rallat Mail: israel@bubiloop.com Projects: bubiloop.com & and.roid.es Israel Ferrer - @rallat - israel@bubiloop.com

Editor's Notes

  • #2 Just for your information please use this hashtags for tweets about this session and for complaing, willings, questions that’s my twitter account
  • #3 Good Morning everyone. Thanks for coming to this session. I am Israel Ferrer founder of bubiloop, the social network for apps recommendation, and and.roid.es, the biggest android community in Spain. I&apos;ve been learning android for two years and nowadays I am working full time in bubiloop and this is some work I made and some parties.
  • #12 First of all, I want to ask you some questions. ¿How many people in this room has and android phone?¿How many of this have a cool new android phone like nexus one or similar? P: Wow incredible, I am impress. N: cool, not bad. You have to improve that! Everyone that has this cool nexus one should know the power handset full of services out of the box. Nowadays this location-based apps are popular because smart phones like Android ones come with GPS, WIFI, 3G, Location based on network, html 5 compliant browser and thanks to Android open environment as developer you can use all that services and content in the phone with no limits to innovate. I suppose that everyone knows foursquare. Foursquare is a location-base social network you are in some place, you check in that place and you win badges and mayor ships. I am going to show you how to make foursquare for Android. Well with no places content but Foursquare basically uses maps and location. So In this session I am going to show you one of the powerful things of Android the integration of Google maps and Location in applications.
  • #13 So Let&apos;s Start, I guess most of people in this room has been working with eclipse and android sdk because for this session I am not going to talk about Android fundamentals so everything you need to start in Android, tutorials, samples, api reference is in developer.android.com.
  • #14 First I am going to show you how to integrate Google Maps on your Application, then I’ll continue with Location on Android and Finally I will give you the link with the code and you can ask me questions about this session
  • #15 Difference between google maps for website and google maps android
  • #17 Las clases más importantes de la libreria son estas. MapView(ItemizedOverlay(Item(GeoPoint))))
  • #23 24/06/09 24/06/09
  • #24 24/06/09
  • #25 24/06/09
  • #28 24/06/09
  • #30 Imagine that your user has disable the GPS location and you use the gps as provider, you ll get a beauty force close so the best practices is use a criteria to get the best provider for every moment.
  • #31 Google maps
  • #32 Location listener receive the notification from location manager on location change and trigger method that update de ui with new data that’s similar to swing.