SMS/MMS

Hi,

I want to distinguish a SMS from a MMS. So I created a variable containing the content of the Google Message app notification and I check if there is a picture in it or not (I use regex \w|\W but I know it's not enough).

Unfortunately, when I receive just an emoji it's considered as a MMS. So my question : what's the correct regex formula to check wether it's a picture or not? Thank you!
 

FrameXX

Well-known member
Can you give us examples of strings of mms messages that you are checking with regex?
 
I can't, as in a MMS there is no text.
So when there is a picture : it's a MMS, ok.
But when it's only an emoji (😀), I'd like it to be considered as a SMS, not a MMS, although there is no text.
 
What did you write in "contains" ? "Picture" ? "B.." ? I don't understand what you wrote.
And do you use Google message ? If you don't, just know that in the notification title from Google message, the word "picture" won't be written.
 

Snurre

Well-known member
What did you write in "contains" ? "Picture" ? "B.." ? I don't understand what you wrote.
Yes I wrote "picture" in contains, and the "B.." is Beskeder that is Messages in danish
Screenshot_20221001_182531_com.arlosoft.macrodroid.jpg Screenshot_20221001_182454_com.arlosoft.macrodroid.jpg Screenshot_20221001_182433_com.arlosoft.macrodroid.jpg

And do you use Google message ? If you don't, just know that in the notification title from Google message, the word "picture" won't be written.
It is Google message and the word picture is in the text not the title
 

Attachments

  • Screenshot_20221001_182454_com.arlosoft.macrodroid.jpg
    Screenshot_20221001_182454_com.arlosoft.macrodroid.jpg
    241.6 KB · Views: 7

Snurre

Well-known member
Ahhhhhhhh thank you ! After some testing I "think" that my trigger has to be "notification received", instead of "SMS received", but it does work now when writing "image" (french for picture). Thank you !
Happy to help 😉
 
Top