MTMs and Contact fields, Question

I thought I’d replace our ages old hand-crafted Create Message menu in Jaiku Contacts with a standard CSendUi/CSendAppUi menu, so that we can pick up arbitrary MTMs (and ECOM plugins now with 9.1). The menu should work so that you select a Contact, then you click the Create Message menu item, and get a list of possible message types to send to that contact (like SMS, MMS, e-mail, what have you).

Turns out it’s not that simple.

On any device, there is an arbitrary set of MTMs. They can be enumerated, and files can be sent through them. Some of them can send messages to specific addresses. An address is a string.

On any contact, you have an arbitrary set of contact fields. They can be enumerated, and you can ask what kind of a field it is (e.g., the Home Phone Number). You can let the user pick a suitable field for, say SMS with CPbkSmsAddressSelect.

Now answer me this: if you have an arbitrary MTM with UID XXX, how do you:

  • Know whether it can send a message to a specific address (maybe CSendUi knows if you give it an address in CMessageData)?
  • What address you should give it (SMS, MMS or e-mail)?

CSendUi (or something) should have a method like ShowAListOfMtmsThatCanSendToThisContact() and CreateANewMessageForThisMTMUidandThisContact().

It doesn’t seem to have such a thing.

So maybe we can just filter out IR and BT from the list of MTMs and get only ‘addressable’ MTMs. That still doesn’t tell us which address we should use…

This entry was posted in Symbian. Bookmark the permalink.

Comments are closed.