>> Please note that I've already seen this: >> _http://code.google.com/android/kb/commontasks.html#addmenuitems_ but
>> that assumes the other app looks for your intent, and I haven't seen >> anything to say so for the contacts or dialer app. >Actually, the "Adding yourself to menus on other applications" on that >page covers another approach to your scenario. In your case, you are >what the page calls "the menu-displaying application". Given an Intent, >you can add to your options menu all the available things that can be >done on that Intent, by calling menu.addIntentOptions() as described. I think I didn't do a good job of explaining what I was looking to do. Using terminology from that link above, my application would be the one providing the service, and the contact app would be the menu-displaying app. Or at least that's what I'm looking to do if it is possible. From reading that link, it seems that if I create an intent filter with a category that the contact app looks for, it should work, but I don't see anywhere anything that mentions if the contact app looks for intent filters or what categories it looks for. -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Murphy Sent: Wednesday, June 18, 2008 9:13 PM To: [email protected] Subject: [android-beginners] Re: Hooks into dialer or contacts app Bushnaq, Ahmad wrote: > In other words, to have a menu option available from the contacts app > that my app puts in there that would invoke it? With respect to the dialer, use the IPhone interface -- it offers dial() and call() methods. With respect to contacts, you need to craft the proper Intent to do what you want. For example: startSubActivity(new Intent(Intent.PICK_ACTION, Uri.parse("content://contacts/people")), PICK_REQUEST); This will bring up the contact selection activity, so the user can pick a contact, with the selected contact's Uri being passed back to you via onActivityResult(). The Intent option may work for the dialer too, with a 'tel:' prefix on the phone number as the text representation of the Uri for the Intent, but I haven't tried that. > Please note that I've already seen this: > _http://code.google.com/android/kb/commontasks.html#addmenuitems_ but > that assumes the other app looks for your intent, and I haven't seen > anything to say so for the contacts or dialer app. Actually, the "Adding yourself to menus on other applications" on that page covers another approach to your scenario. In your case, you are what the page calls "the menu-displaying application". Given an Intent, you can add to your options menu all the available things that can be done on that Intent, by calling menu.addIntentOptions() as described. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ -- Available Now! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

