messages

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

messages

Post by Rafi4 » 11 Dec 2018 10:57

Hi all
in this flow and widgets I want to get SMS sender name and message separately. how can I get? any help?
I want to read messages without going to my messages application. any suggestions please post.

now I am getting message as example
"+9190000095040I am too busy now". in this example I want to separate sms sender name and message as
sms sender name at the top of the widget and message in message body. I am uploading 3 flows and one widget
please correct them and upload.

thanks from record
Attachments
start_first_20181211_172332.xml
(1.23 KiB) Downloaded 649 times
messages.xml
(32.67 KiB) Downloaded 564 times
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: messages

Post by Desmanto » 11 Dec 2018 16:27

As I check your "message create" flow, there is script to add

Code: Select all

addMapEntry(global_message_map,a,sms_sender+ sms_text);
This is where the sms sender and sms text being concatenated. You shouldn't concat them like that, if you still need them separately. You can store them in list format, but it will change the way you show the message (using the list element). At least, if you still have to combine them, add some separator char in between. Example, for your case, it is easier to add line break "\n". you entry map will be

Code: Select all

addMapEntry(global_message_map,a,sms_sender + "\n" + sms_text);
This will make the text store as

Code: Select all

+9190000095040
I am too busy now
If you need to separate it again, you can just split it by using "\n".

Your widget will automatically show the line break too. So there is not much to change for now, simply add + "\n" in between
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Re: messages

Post by Rafi4 » 11 Dec 2018 22:47

hi Desmanto
thanks a lot. thanks for your solution.
you are genius.

thanks from record4
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

Post Reply