3

enter image description here

How do I start Navigation maps inside the layout Activity?

Cameron Fredman
  • 1,259
  • 11
  • 24
Barbie Smile
  • 303
  • 1
  • 10

1 Answers1

0

You should take a look at this tutorial, it's very comprehensive and the format of stackoverflow isn't intended for long tutorials.

As a general matter, Google provides a library for using Google Maps in your application called MapView. The sourcecode for the example is available here.


UPDATE: Based on the comments below, and now that I understand the question better, the answer is that you cannot invoke code or reuse code from one application within another in android. The only official way is to use Intent to invoke the entire Activity. (Here's another thread on the topic.)

Community
  • 1
  • 1
Cameron Fredman
  • 1,259
  • 11
  • 24
  • I'm not use mapview in here, Navigation maps is the app in my device. First I will check this App is install in my phone or not, if it is istalled I will use this Intent intent = new Intent(); intent.addCategory("android.intent.category.LAUNCHER"); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); intent.setPackage("com.google.android.apps.maps");startActivity(intent) to call this app – Barbie Smile Feb 20 '13 at 07:19
  • Ah. Are you trying to run one app within the fragment of another? – Cameron Fredman Feb 20 '13 at 07:22
  • @BarbieSmile Afraid what you're asking for isn't possible. I updated my answer to reflect that. – Cameron Fredman Feb 20 '13 at 07:29
  • @BarbieSmile, sorry for the disappointing answer. If you can use a webpage instead of an app, you could do it that way. If I could persuade you to hit that green checkbox by my answer, you'd be doing us both a favor too. :) – Cameron Fredman Feb 20 '13 at 07:41
  • I do this with webpage and it's ok, but it not correct with request, thanks @CamFred I will try to find solution :) – Barbie Smile Feb 20 '13 at 07:46
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/24810/discussion-between-cameron-fredman-and-barbie-smile) – Cameron Fredman Feb 20 '13 at 07:47