I have a widget that displays contacts and/or phone numbers, based on things 
like Calendar events. When the user touches a tile, my widget gets a 
broadcast (so that I can do some logging) and then builds an Intent to start 
an Activity that launches the Contacts/Dialer app, using 
Intent.FLAG_ACTIVITY_NEW_TASK 
| Intent.FLAG_ACTIVITY_CLEAR_TOP flags.. For contacts, I use 
Intent.ACTION_VIEW and a ContactsContract.Contacts.CONTENT_LOOKUP_URI URI; 
for phone numbers, I use Intent.ACTION_DIAL and a "tel:" URI. 

Works just fine *except* that if I tap a contact, then Home, then a phone 
number, then Back, I go to the contact, not to the Home screen. And if I tap 
a phone number, then Home, then a contact, then Back, I go to the phone 
number, not to the Home screen. (If I tap a contact, then Home, then a 
contact, then Back, I do go to the Home screen; ditto if I tap a phone 
number, then Home, then a phone number, then Back. I get the same behavior 
when I use Intent.ACTION_VIEW  for both contacts and hone numbers:  The key 
*seems* to be the different MIME types ....)

And, yes, this is supposed to run on phones, so Intent.FLAG_ACTIVITY_CLEAR_TASK 
is 
not an option.

Has anyone run into this before? Or have any suggestions? (Since some phones 
*do* have separate Contacts and Dialer apps, I'd prefer to stick to generic 
Intent/Activity manipulation, and to avoid anything based on reading the 
source of the Contacts app.)


-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to