Need to create a list with the content of the SMS that I can send through the app

Hello everyone, I'm kind of new here in MIT app inventor, my issue that I'm having is that I can send messages to a phone number, but dont know how to save the content of those messages in a list inside the app that I can see when I need to.


You might have to tweak the date time formatting.

See the introductory articles in

1 Like

My code only logs incoming messages caught by AI2.

You can use similar code to save messages sent from an AI2 app.

I don't expect AI2 to be able to catch messages sent by the phone's native SMS app (though I have not used this component yet.)

1 Like

Thanks a lot for your help, sorry for my ignorance but does your code create a button that when touched opens another screen and opens the list? Sorry if I'm not making myself clear.
This is the app I'm making, the only issue I'm having is that when I touch the button 2 "total" an error occurs.Thank you for your help tho
rega_2 (1).aia (588.2 KB)

No, it only accumulates the incoming messages in a list in TinyDB.

The rest, you have to add yourself.

I looked inside your app, on the code server.
It is mostly rubble:

I dug this out of the rubble:

Where did you get the idea that an incoming message text has a list structure that allows selecting items from a list?

And what are the 4 items that you wish to sum?

Hello, first of all, thank you very much for your help. I accidentally deleted that part of the code. My goal is to receive an SMS, for example 1,2,3,4, and save the sum in a list that goes to button 2 and 1,2,3,4 goes to button 1 and 2 so that I can see the sensor data for school work.

To turn a text with embedded commas into a list, split it at ','.

Remember to check the length of list afterwards, to guard against short lists.

Can I save the saved message on the list as a csv file or use as a csv file?

If you want to save the incoming messages, would they be a list of 4 item lists, like a four column table?