How to determine when a message has been sent?

I know that there’s probably no way to know when a user has actually sent an SMS text message from a Thunkable app but I’m hoping someone has a suggestion for a way to figure that out.

When I use the In—>Share—>SendTextMessage block, it opens the default messaging service on the phone. If the user sends a message, it then switches back to the Thunkable app. What if I had a timer running and right before I call SendTextMessage, I change a variable value from false to true (e.g. OpenedSMS=true) and store the value of the timer. Then, I have a block that constantly checks to see if OpenedSMS is true AND the current timer value is the same as the stored value… or say, 1 second greater. That way, I know that the app switched to an SMS app and switched back since only a second or so has elapses.

Would that work? I would test it myself but I can’t get a simple count up timer to work. Can someone share a screenshot of a working count up timer? I’ve looked through the forums and so far haven’t found one from Thunkable X that just displays a timer that counts up each second.

You could even just use the device blocks to log the time stamp of when the SendTextMessage function is called?

It’s not perfect, but would work perfectly well for a proof of concept @tatiang!

1 Like

I thought of that first but the problem is that I don’t know when they resume from sending a message and the time stamp would keep updating while they are in the SMS app. So I don’t think I could rely on that. I need a value that pauses when the app is in the background.

On second thought, maybe it would work. I want to be able to display an alert that shows the message they send (which I store in a variable) after they send it.

1 Like