Can Last Update Trigger be used to read sms?

I still haven’t got my read out sms loud automation to function the way I want.
Then I thought I could use the Last Update Trigger sensor to subscribe to the sms service (android.provider.Telephony.SMS_RECEIVED).
But it doesn’t seem to work.

Is that since the app does not have sms permissions?

yes it does require SMS read permissions.

https://developer.android.com/reference/android/provider/Telephony.Sms.Intents#SMS_RECEIVED_ACTION

Unfortunately the app will not qualify for this permission as its considered dangerous, similar to why we are not allowed to read the last caller ID.

https://developer.android.com/reference/android/Manifest.permission#RECEIVE_SMS

See the SMS section here for permissions that we do not qualify for: Permissions and APIs that Access Sensitive Information - Play Console Help

why not for this use case just use Last Notification with the SMS app in the allow list?

The issue is when there are more than one unread sms.
When that happens ut can’t be used so I figured I could read the intent.

I haven’t looked at your links yet but I will when I get time.

yea known issue: Notification attributes (array/list) not expanded (android.textLines and android.people.list) / Stacked messages · Issue #1206 · home-assistant/android · GitHub

I know…
I thought I had found a workaround.

And that probably means my second workaround also will fail.
Mark sms messages as read using intents after they are read out loud.

does tasker have these permissions? might be a job for tasker?

That’s a good idea.
Sadly I haven’t yet managed to communicate from Tasker to HA yet.
I guess I’ll have to spend some time with that.

I’ll see if that works.

make a POST to the webhook from tasker to send in data :slight_smile:

I’m going to give that a try again and see if I can learn how to use Tasker a bit more than I use it for today.
Thanks!

I read the link, so unless Home Assistant app is the main sms app it can’t get sms permissions.
Makes sense when you think of security.
Thank you.