Feature Request: Suggest default email address when composing

I have many contacts with multiple email addresses. When I type such a contact name in the To field, K-9 appears to list that contact’s email addresses alphabetically, regardless of whether I have labeled one of them as the default email address for the contact or how they are listed within the contact. Sometimes this results in having to scroll between my on-screen keyboard and the To field to select the correct one.


I would like option for K-9 to recognize a contact’s default email address and place it above all others.

Hi

If you mark a contact as favorites in your contact application, it will be on top of list (in k-9 beta)

Regards

I created a feature request for this in our issue tracker: https://github.com/k9mail/k-9/issues/5054

The feature will be included in the next beta version.

Sorry to revive an old thread. This has never worked for me but I’ve just ignored it up to now.

In the case of my wife the Google Contacts app shows that I’ve selected a default email address for her, of the 5 or so that are specified in her contact details. Yet K9 shows all addresses in alphabetical order.

I can’t find a setting in K9 to control this so what am I doing wrong? I’m on the latest beta.

Thanks!

It’s possible that the current code only works as expected if the contact is marked as default in Android’s contacts app. Android’s contacts database supports merging contacts from different sources (e.g. Google contacts and Exchange contacts). Both sources could have different email addresses marked as default. That’s why the contacts database column for a default address on the device is called IS_SUPER_PRIMARY. Right now we only use that one for sorting, but not IS_PRIMARY which reflects whether or not an address has been marked as default in the source of the contacts (e.g. Google contacts). I assumed that if there’s only one source and a contact is marked as default there it’ll automatically be marked as local default, too. But that may not be the case.

In short: to make it work right now, mark one of the email addresses as default in your Android device’s contacts app.
I’ll update K-9 Mail to first sort by IS_SUPER_PRIMARY, then IS_PRIMARY. That should do the right thing when an email is only marked as default in a contacts source, but not on the device.

1 Like

Thanks for the very detailed reply. Honestly I don’t know how to respond except to say thanks and I’ll wait for the next beta to see if anything changes.

If there’s something specific that you want me to check let me know. I don’t believe that my wife’s contact is merged, and truthfully I don’t seem to get the expected behavior for any of my contacts. Again, I’ll wait for the next beta.

Cheers!

Looks good in 5.738 - thanks!