tags:

views:

2113

answers:

1

hello,

I wan to launch any one of the android application say it can be contacts or call dialler from another app(from my app upon on click on button).

All that i know is to get the intent of the particular app and start the activity. But I don no how to set the class path for the intent for contacts.

Can any one help for my following queries:

1) Am I following the correct solution. 2) what is the way to launch another application.

Thanks in advance

+4  A: 

You don't really call another application - you generate the intent and then wait for someone to pick it up. Are you referring to Contact's app URL as "class path"? If so here's Contacts.Intents helper class reference that you can use to create Contacts intents

Here's a short example:

Intent intent = new Intent();
intent.setAction(Contacts.Intents.SHOW_OR_CREATE_CONTACT);
DroidIn.net
Actually i wan to dial a number on click on button.I tried with this code :Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:666444666"));startActivity(dialIntent);But this is not working.Do you have any idea how do i proceed with this.
Ambika
One thing that you should check is to add permission to your manifest file. Do you have any sort of error generated? What's in the log when you execute that line of code?
DroidIn.net
The code which is workin to dial a number isIntent dialIntent = new Intent( "android.intent.action.DIAL",Uri.parse("tel:666444666")); startActivity(dialIntent);users Permission is manifest file:<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>This perfectly working....
Ambika