Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Google Maps in Android

11,188 views

Published on

Slides from the workshop presentation at Mobile 2.0 Europe Developer Conference 2010 on "Google Maps in Android" by Israel Ferrer from And.roid.es.

Published in: Technology
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❤❤❤ http://bit.ly/2u6xbL5 ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Sex in your area is here: ❶❶❶ http://bit.ly/2u6xbL5 ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Google Maps in Android

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

×