Extract MMS sender's phone number?

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Extract MMS sender's phone number?

Post by Scotty » 29 Aug 2016 14:39

Hi

New poster, looking for a bit of advice. I have set up a flow that activates when I am driving. When I receive an email or SMS, it auto-responds only to a specific set of email addresses, or to specific SMS senders. It works perfectly. However, I'd like to add the ability to autorespond to specific senders when I receive an MMS. I have used the "Content provider changed" trigger, with the Content URI set to mms, and it activates correctly (that is, it triggers following receipt of an mms, but not of an sms).

My problem is that I don't know how to extract the phone number of the person who sent that mms. If I change the Content URI from mms to mms-sms, and then receive an sms, the {sms_sender} variable is correctly populated with the sender's number. So, basically, I'd like to be able to identify the equivalent of {sms_sender} whenever I receive an mms. Can anyone point me in the right direction?

BTW, Martin, this program is terrific. It's completely replaced Llama + Zooper on my phone.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Extract MMS sender's phone number?

Post by Martin » 29 Aug 2016 20:05

Hi,

You could check if the variable content_uri of the triggger is populated and then use an action Query Content Provider to read the values. Unfortunately I'm not experienced using the MMS provider but it looks that an URI like content://mms/{id}/addr could contain the values you are looking for (in the action set projection to address and result type to Single value).

Thanks! I'm glad you like Automagic :D

Regards,
Martin

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Extract MMS sender's phone number?

Post by Scotty » 29 Aug 2016 21:35

Martin wrote:Hi,

You could check if the variable content_uri of the triggger is populated and then use an action Query Content Provider to read the values. Unfortunately I'm not experienced using the MMS provider but it looks that an URI like content://mms/{id}/addr could contain the values you are looking for (in the action set projection to address and result type to Single value).

Thanks! I'm glad you like Automagic :D

Regards,
Martin
Thank you - I'll give that a try.

Post Reply