Saturday, July 30, 2011

[android-developers] Open Google Maps with Route In Tab Using Activity

I was able to get a screen to open that shows a route using Google Maps however it opens up separate from my application.  I would like it to opens up in the tab that I launch it from within my application.  Can that be done?  if so, how would I do that?  thanks

I open the Activity like this from within an Activity in a tab

           Intent lv_intent = new Intent( SelectedActivity.this, MapSelRouteActivity.class);
           lv_intent.putExtra("p_loc_id", p_loc_id);
           startActivity(lv_intent);  
           finish(); 

And this is how the Google Route is opened in the MapSelRouteActivity activity

      Uri uri =Uri.parse("http://maps.google.com/maps?" +
                         "&saddr=" + lv_lat_s + "," + lv_long_s +
                         "&daddr=" + lv_lat_d + "," + lv_long_d);
      Intent intent = new Intent(Intent.ACTION_VIEW, uri);     
      startActivity(intent);
      finish();   

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate