Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void initNav(){
- String dLatitud="19.6893579";
- String dLongitud="-100.5505599";
- //Uri gmmIntentUri = Uri.parse("google.navigation:q="+dLatitud+","+dLongitud+"");
- //destino=""Eréndira+A+León+20"";
- Uri gmmIntentUri = Uri.parse("google.navigation:q="+destino+"");
- Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
- mapIntent.setPackage("com.google.android.apps.maps");
- Log.d("Dummy FB", gmmIntentUri.toString());
- if(mapIntent.resolveActivity(getPackageManager())!=null){
- startActivity(mapIntent);
- }else{
- Toast.makeText(this, "Instala Google Maps para continuar", Toast.LENGTH_SHORT).show();
- }
- }
Add Comment
Please, Sign In to add comment