views:

38

answers:

1

Hello,

I am interested in opening the Google Navigator app from inside an application I am writing. I want to be able to spawn it at a given time and pass specific data into it.

Can anyone think of a good way for me to do this? What permissions do I need, etc? Thank you very much.

+3  A: 

You are looking for intents. These are messages you throw up to the system that allow the appropriate action to be taken, such as opening another application.

Here is a guide to using Intents and Intent Filters.

In particular, here is a page that discusses the intents you should use for Google's applications, including Google Maps.

Also, see here for a similar question asked on Google's forum.

A sample of example code that works is as follows:

Intent i = new Intent(Intent.ACTION_VIEW, 
Uri.parse("google.navigation:q=New+York+NY)); 
startActivity(i); 
HXCaine
Wow! Fantastic answer T3Roar. Thank you so much.
Tom G
It's my pleasure. Don't forget to accept the best answer to your questions once you are satisfied with responses :)
HXCaine