Hi droid08, What you're trying to do (if I got you right) is possible: When your custom activity is launched from the contacts you get a uri (from getIntent().getData()) such as content://contacts/phones/1 where the '1' is the id of the contact, you can use this id to query the contacts content provider and get the phone number or any other detail of the selected contact. However, the manner in which the custom action appear in the contacts application is very strange, you need a lot of wondering around in order to notice it, what works for me is press the contact for some time, then select 'call' from the popup menu that appear and then click the right arrow (!!??!) Another thing is, after my activity is launched from the contacts application, if I try to return to the contacts application again it never show up again, it transfer me again to my app.
bye, Shmulik On Mar 18, 6:55 pm, hackbod <[EMAIL PROTECTED]> wrote: > Oh! I didn't realize you were actually trying to extend the app. No, > I don't think it currently supports this. > > Note that if you do this, you must use your -own- action name, not > "VIEW". When you say you support the VIEW action, you are saying that > you want to be the one launched when the user selects that kind of > data. > > On Mar 18, 2:28 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > I thought you were talking about the incoming call :-) > > So there is no way in 1.0 to add a menu to the contacts app and do > > something with the phone number been shown. > > > many thanks > > > On 17 mar, 22:25, hackbod <[EMAIL PROTECTED]> wrote: > > > > Again, this is not supported for 1.0. :) > > > > What you are doing here is saying you can handle -any- action of that > > > MIME type. This is actually something nobody should be doing; I think > > > we'll not allow intent-filters of this type to prevent applications > > > from mistakenly doing this. > > > > On Mar 17, 6:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > okay I see, now I've tried without the call action: > > > > <activity android:name=".CallController" > > > > android:label="My call" > > > > android:theme="@android:style/Theme.Dialog"> > > > > <intent-filter label="Call event"> > > > > > > > > <dataandroid:mimeType="vnd.android.cursor.item/phone" /> > > > > <category > > > > android:name="android.intent.category.SELECTED_ALTERNATIVE" /> > > > > <category > > > > android:name="android.intent.category.ALTERNATIVE" /> > > > > <category > > > > android:name="android.intent.category.DEFAULT" /> > > > > </intent-filter> > > > > </activity> > > > > > In "CallController" I still receive the Bundle (icicle) with a null > > > > value. How can I know in CallController about the data been seleceted > > > > (outgoing call / called number)? Should I use a different mime type? > > > > > On 17 mar, 15:36, hackbod <[EMAIL PROTECTED]> wrote: > > > > > > What your activity is doing is trying to replace the in-call screen > > > > > (which is what the CALL_ACTION is launching). This is not supported > > > > > for 1.0, as there are close connections between the in-call screen and > > > > > telephony stack that require they run in the same process. > > > > > > The other categories you have there -- SELECTED_ALTERNATIVE and > > > > > ALTERNATIVE -- are probably not doing anything. (You'll get the same > > > > > behavior if they are removed.) These are used for adding menu items > > > > > to other applications of new actions your own application can perform > > > > > on the data being shown by the other app. > > > > > > On Mar 17, 4:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > > > Megha, > > > > > > > Perhaps I'm missing something. Let me explain. > > > > > > > What I need to know is the called number (not calling number) when > > > > > > the > > > > > > user is going to make a call from the built-in Android contacts > > > > > > activity. > > > > > > My activity (executed by the SELECTED_ALTERNATIVE menu) receives a > > > > > > null bundle. I mean, there is no way to know the user selected > > > > > > contact > > > > > > (number to be called). Any ideas? > > > > > > > thanks > > > > > > > On 16 mar, 15:52, "Megha Joshi" <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > > > > > The CALL_ACTION is for launching an activity, not an > > > > > > > IntentFilter. It is > > > > > > > not a broadcast action. So you cannot receive it in your > > > > > > > application's > > > > > > > Intent filter. As of now there is no way of intercepting an > > > > > > > incoming call > > > > > > > and knowing the caller's number. You may want to log this as a > > > > > > > feature > > > > > > > request in the android issue tracker. However, you can know the > > > > > > > phone's > > > > > > > state like whether it is ringing , etc. using the > > > > > > > PhoneStateIntentReceiver > > > > > > > class.http://code.google.com/android/reference/android/telephony/PhoneState... > > > > > > > > Thanks, > > > > > > > Megha > > > > > > > > On Sat, Mar 15, 2008 at 8:36 AM, [EMAIL PROTECTED] <[EMAIL > > > > > > > PROTECTED]> > > > > > > > wrote: > > > > > > > > > I have the following in the manifest file: > > > > > > > > <activity android:name=".CallController" > > > > > > > > android:label="My call" > > > > > > > > > > > > > > > > android:theme="@android:style/Theme.Dialog"> > > > > > > > > <intent-filter label="Call"> > > > > > > > > <action android:name=" > > > > > > > > android.intent.action.CALL" /> > > > > > > > > <dataandroid:mimeType=" > > > > > > > > vnd.android.cursor.item/phone" /> > > > > > > > > <category > > > > > > > > android:name="android.intent.category.SELECTED_ALTERNATIVE" /> > > > > > > > > <category android:name=" > > > > > > > > android.intent.category.ALTERNATIVE" /> > > > > > > > > <category android:name=" > > > > > > > > android.intent.category.DEFAULT" /> > > > > > > > > </intent-filter> > > > > > > > > </activity> > > > > > > > > > The activity receives the bundle (icicle) with a null value. > > > > > > > > How do I > > > > > > > > get the called number in my activity? > > > > > > > > > thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---

