1
Button button = (Button) convertView.findViewById(R.id.buttonComoChegar);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String latitude = itemPosicao.getLatitude();
String longitude = itemPosicao.getLongitude();
String strUri = "http://maps.google.com/maps?q=loc:" + latitude + "," + longitude;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(strUri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
context.startActivity(intent);
}
});
Possible duplicate Calculation to get longitude and latitude from my location
– user28595
that doesn’t solve...
– Mauro Santos
See if it helps you: http://answall.com/questions/13061/howto rescues%C3%A7%C3%A3o-gps-in-coordinates-all-Usu%C3%A1rios-do-aplicati
– user28595
Like, I have a listview showing some users and that there shows the one button to go to the user’s location, only that this list wanted to show from the nearest point ie if up down without the user knowing. The list would show users closer.
– Mauro Santos