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.

Usando Google Maps en tu Android App

16,193 views

Published on

Estas son las diapositivas de mi presentación sobre Google Maps en Android para el evento de GTUG El Salvador del 11 de Mayo 2011.

Published in: Technology, Business
  • Was a little hesitant about using ⇒⇒⇒WRITE-MY-PAPER.net ⇐⇐⇐ at first, but am very happy that I did. The writer was able to write my paper by the deadline and it was very well written. So guys don’t hesitate to use it.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • 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 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 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 THE BOOK INTO AVAILABLE FORMAT (New 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 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

Usando Google Maps en tu Android App

  1. 1. Usando Google Maps en tu Android App @oscarsalguero
  2. 2. Agenda•  Huella Digital y Certificado de Debug•  API Key de Google Maps•  Android App con Google Maps: •  Creando el proyecto correctamente •  Retoques al Android Manifest •  XML Layout con MapView •  Activity que hereda de MapActivity •  Custom Overlay para agregar Capas •  Detectando la ubicación del Usuario (Bonus!)   Simulando una ubicación (Mock Location)•  Enlaces de interés•  Preguntas @oscarsalguero
  3. 3. Huella Digital y Certificado para Debug•  Es una firma digital que identifica a cada App en el Market o a tuEclipse IDE.•  Es necesaria para que los mapas funcionen en el simulador y enlos dispositivos.•  Sin ella, los mapas sencillamente no cargan.•  Se genera con una herramienta llamada “keytool” ubicada en:[folder-de-tu-android-sdk]/tools/•  El comando es:keytool -list -alias androiddebugkey –keystore[USER_FOLDER]/.android/debug.keystore @oscarsalguero
  4. 4. Huella Digital y Certificado para Debug @oscarsalguero
  5. 5. El API Key de Google Maps•  Necesitas tener una cuenta de Google para obtener una.•  La API Key será asociada a tu cuenta de Google.•  Hay una unica API Key (llave) por cada App.•  Si la “huella digital” (fingerprint MD5) de tu App cambia, deberásobtener otra API Key con la nueva “huella digital”.•  Es necesaria para que los mapas funcionen en el simulador y enlos dispositivos.•  Sin ella, los mapas sencillamente no cargan.•  Se genera obtiene aquí:http://code.google.com/android/maps-api-signup.html•  Aquí se usa el fingerprint MD5 que generamos en el paso anterior. @oscarsalguero
  6. 6. El API Key de Google Maps @oscarsalguero
  7. 7. Creando el Proyecto Correctamente1.  Haz click en el menu File -> New -> Android Project2.  Escribe “GoogleMapsDemo” en el campo “Project name”.3.  Deja el grupo de campos bajo “Contents” como esta por defecto.4.  Como “Build Target” debes elegir una opción que incluya Google APIs, con un API Level mayour o igual que 7.5.  En el grupo de campos llamado “Properties”, especifica el nombre de la App, un paquete, una Activity y un Min SDK con valor de “7”.Tips:•  No nombres tu Activity como “MapActivity”, porque tendrá conflicto de nombre con una Activity de la API de Google Maps.•  No utilices API Levels menores que 7, porque perderas features de las APIs. @oscarsalguero
  8. 8. Creando el Proyecto Correctamente @oscarsalguero
  9. 9. Creando el Proyecto Correctamente @oscarsalguero
  10. 10. Retoques al Android Manifest1.  Hay que indicar que nuestra App usa la librería de Google Maps2.  Nuestra App necesitara acceder a Internet para traer los mapas y para lograr nuestro “Bonus feature” de detectar la ubicación del usuario necesitaremos permisos para usar el aGPS. @oscarsalguero
  11. 11. Retoques al Android Manifest3. Nos desharemos de la barra de título para tener mas espacio en nuestro Mapa. @oscarsalguero
  12. 12. XML Layout con MapView•  En Android, la interface de Usuario (UI) la creamos en un XML.•  Casi todos los componentes son Views, el de mapas (MapView) no es la excepción.•  Nuestra App tiene un XML Layout con un MapView, el archivo main.xml: @oscarsalguero
  13. 13. Activity que hereda de MapActivity•  En Android, una Activity es la “pantalla”, la UI con la que el Usuario interactua, donde hace click, y donde visualiza la información.•  Para usar Google Maps, nuestra Activity tiene que heredar de MapActivity. @oscarsalguero
  14. 14. Custom Overlay para agregar Capas•  Un Custom Overlay sirve para agregar Layers (capas) con información al Mapa, pines o iconos que denotan lugares es lo común.•  Debemos importar el paquete com.google.android.maps.*;•  Y debemos hacer una clase que herede de ItemizedOverlay, en este caso he llamado a dicha clase “CustomOverlay”.•  Podemos sobreescribir varios de los métodos de ItemizedOverlay para que los items en estas capas se comporten y vean como queremos, entre ellos:   addOverlay   createItem   size   onTap @oscarsalguero
  15. 15. Custom Overlay para agregar Capas•  Necesitaremos importar las librerias siquientes:•  Heredar de ItemizedOverlay:•  Debemos remitirnos al código fuente para ver los metodos a ser utilizados y los que serán modificados ( son los que tienen @Override). @oscarsalguero
  16. 16. Detectando la ubicación del Usuario•  Los dispositivos Android te dejarán saber la ubicación del usuario con su Latitud y Longitug si cuentan con un módulo aGPS, este usa un acceso directo a satélites GPS orbitando nuestro Planeta, o usa triangulación de señales celulares provenientes de torres o routers Wi-Fi a tu alrededor.•  La latitud y longitud son generalmente un “float” con signo.•  Accederemos a los Location Services usando el objeto LocationManager. @oscarsalguero
  17. 17. Detectando la ubicación del Usuario•  Podemos hacer algo cuando el Usuario se esta moviendo y su ubicación esta cambiando, usando un LocationListener. @oscarsalguero
  18. 18. Simulando una ubicación•  Usando ADT para Eclipse y su DDMS se puede probar una App que muestre la ubicación del Usuario indicando la Latitud y Longitud manualmente o en un archivo KML. @oscarsalguero
  19. 19. ¿Preguntas? @oscarsalguero
  20. 20. Enlaces de Interés•  El código fuente de esta presentación esta en GitHub:https://github.com/RacZo/GoogleMapsDemo•  Obtaining a Maps API Keyhttp://code.google.com/intl/en/android/add-ons/google-apis/mapkey.html•  Signup for the Android Maps APIhttp://code.google.com/android/maps-api-signup.html•  Google Map Viewhttp://developer.android.com/resources/tutorials/views/hello-mapview.html•  Android Developers http://developer.android.com @oscarsalguero
  21. 21. ¡Muchas gracias! Twitter: @oscarsalguero Sitio Web: www.oscarsalguero.comThis work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ orsend a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

×