1

In my application : I have Find Home Tab.. On clicking it and after passing the co-ordinates from emulator control it should show the map...

If I use intent

Uri uri = Uri.parse("http://maps.google.com/maps?saddr=42.35892,-71.05781&daddr=40.756054,-73.986951");
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, uri);
        startActivity(intent);

Its not showing the tabs of my application...

How do I associate intent with my application and make it show the map in my application..

Also is it possible to show textbox below the map displayed by this intent??

Please help..

Thanks.

EboMike
  • 76,846
  • 14
  • 164
  • 167
Android_enthusiast
  • 863
  • 5
  • 22
  • 41
  • Thanks for doing that! Unfortunately, I don't have an answer for you, but there are lots of other smart people here. I'm counting on them! – EboMike Dec 03 '10 at 01:39

1 Answers1

1

You will have to include the map in your Activity.

Here the infos by google: http://developer.android.com/resources/tutorials/views/hello-mapview.html

Text below the Map: How can I add a TextView below a MapView?

You can then set the tab to display the MapActivity you created the way explained int hose links above.

To draw the path in the Map do the same as the person here: android get duration from maps.google.com directions

Community
  • 1
  • 1
Patrick Boos
  • 6,789
  • 3
  • 35
  • 36
  • thanks.. but in that case I have to draw the route myself on mapview overlay... I want to use the intent and show the map displayed by intent on top of my application so that the buttons of my application and visible to user.. is this possible ?? – Android_enthusiast Dec 03 '10 at 02:18
  • i just tried it to put the browser or the google map app into a tab. is not working :( i can put my own activity in a tab, but not theirs. they just start the new app. seems you will have to display the path by yourself. – Patrick Boos Dec 03 '10 at 02:29
  • just found another post about showing the driving directions in the own map.. added the link to my answer. – Patrick Boos Dec 03 '10 at 02:36
  • thanks patrick... I am already showing the path, but I wanted detailed directions to be shown to the user... adding map using intent works best but I wanted the controls in my application to be shown as well.. looks like its not possible :( – Android_enthusiast Dec 03 '10 at 03:22