how to launch default driving directions or map app from another native app

I want to press a button in my native app which will be both android and iphone, and have it launch the default maps/directions app or at least ask the user which app to choose. Is this possible in both android and IOS? If so, could anybody provide a good link? Is it also possible to provide starting and destination parameters? Thanks a bunch.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KRUNAL TAILORFreelance Mobile DeveloperCommented:
Hi BobHavertyComh,

You may try something like this for iOS. For iOS you have option of two types maps. one is apple default map and second is Google Map app. For each of to open from your app, this application is require to installed on your device. If not installed it will not work. See URL Refrence for iOS Map:

NSString *mapstr=[[NSString alloc] initWithFormat:@",%f&daddr=%f,%f",starting address latitude,starting address longitude,destination address latitude, destination address longitude];
NSURL *mapurl=[[NSURL alloc] initWithString:mapstr];
[[UIApplication sharedApplication] openURL:mapurl];

Open in new window

Note: All latitude, longitude must be a float value.

For GOOGlE map on ios

Many ref you will get by, Here are some for ios


String uri = String.format(Locale.ENGLISH, ",%f&daddr=%f,%f", sourceLatitude, sourceLongitude, destinationLatitude, destinationLongitude);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));

Open in new window

Hope this is what you are looking.

Thanks & Regards,
Krunal T. Tailor

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BobHavertyComhAuthor Commented:
Thanks Krunal
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.