You are on page 1of 2

keytool -list -v -keystore C:\Users\Byron\KeyStore\MapsLocation.

jks -alias Byron


-storepass 123456 -keypass forsaken95

A0:C2:D9:63:4E:34:FF:C7:D2:9B:55:33:54:91:D5:ED:29:2E:3C:BB

private void agregarMarcador(double Log, double Lat) {

LatLng coordenadas = new LatLng(Log, Lat);


CameraUpdate miUbicacion = CameraUpdateFactory.newLatLngZoom(coordenadas,
16);
if (marcador != null) marcador.remove();
marcador = mMap.addMarker(new
MarkerOptions().position(coordenadas).title("Ubicaci�n actual")
.icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher)));
mMap.animateCamera(miUbicacion);
}

private void ActualizarUbicacion(Location location) {

if (location != null) {
Lat = location.getLatitude();
Log = location.getLongitude();
agregarMarcador(Lat, Log);

LocationListener locationListener = new LocationListener() {


@Override
public void onLocationChanged(Location location) {
ActualizarUbicacion(location);
}

@Override
public void onStatusChanged(String s, int i, Bundle bundle) {

@Override
public void onProviderEnabled(String s) {

@Override
public void onProviderDisabled(String s) {

}
};

private void Miubicacion() {

if (ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
return;
}
LocationManager locationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
Location location =
locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
ActualizarUbicacion(location);

locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,10000,0,
locationListener);

You might also like