Android QuickContact Badge

2019-08-23 05:43发布

问题:

In my Android app I have dataset comprising of phone numbers. These are shown in a list view with rows consisting of an QuickContactBadge and phone number.

When drawing this list onscreen, we are mapping device contacts with phone numbers and also show Display Name for the contact.

QuickContactBadge is setup to perform lookup based on Phone number.

Problem : Native contacts cause QuickContact Activity to be shown. However, clicking on unknown contacts has no bearing at all. Nothing happens.

How are we supposed to configure QuickContactBadge for unknown contacts?

The phone app on my Android phone also seems to employs QuickContactBadge and handles both native and unknown contacts pretty well.

回答1:

I ended up writing a custom solution since the behavior of Quick Contact badge was not consistent across the Phones. When a contact does not exists on local storage, on some devices QuickContactBadge opened "Add Contact" Page whereas on some it did nothing.