Your SlideShare is downloading. ×
Geolocalización v2
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Geolocalización v2

200
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
200
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Jimmy Atocza Ledesma
  • 2.  GPS Google Services Location
  • 3.  Permisos ◦ En el archivo MANIFEST  Permiso para acceder a internet. <uses-permission android:name=”android.permission.INTERNET” />  Permiso para obtener la información de la ubicación por GPS o por el proveedor de red. <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  • 4.  Libreria de Mapas ◦ Utilización de las librería de mapas. ◦ En el archivo MANIFEST <uses-library android:name="com.google.android.maps" />
  • 5.  Código ◦ En la Clase de la Actividad Principal se tiene que heredar de la clase MapActivity y se implementa la interface LocationListener. public class Main extends MapActivity implements LocationListener
  • 6.  Código ◦ Al heredar de MapActivity se tiene que implementar el método:  boolean isRouteDisplayed(); ◦ Al implementar LocationListener se tienen que escribir los siguientes métodos:  onLocationChanged(Location location);  onProviderDisabled(String provider);  onStatusChanged(String provider, int status, Bundle extras);  onProviderEnabled(String provider)
  • 7.  CódigoLocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);LocationListener locationListener = new LocationListener() { public void onLocationChanged(Location location) { makeUseOfNewLocation(location); } public void onStatusChanged(String provider, int status, Bundle extras) {} public void onProviderEnabled(String provider) {} public void onProviderDisabled(String provider) {} };locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locatio nListener);
  • 8.  Mas Información ◦ Diseño  http://espanol.free-ebooks.net/ebook/Curso-Android/html/67#read ◦ Mapview y MapActivity  http://android-coding.blogspot.com/2011/06/mapview-and-mapactivity.html