0

Is it possible for an app to be able to get alerted when another app marks an SMS text message as read?

First instinct is to just poll SMS messages periodically, but that sounds like a massive waste of battery.

Tim Morris
  • 385
  • 1
  • 3
  • 11
  • 1
    If that other app is using the SMS Provider, you could set a `ContentObserver` on the Provider, but you'd need a constantly-running foreground `Service` to do that. (There is no requirement that an SMS app use the Provider, however, though most seem to.) If this is for a personal project, that's possibly just fine, but for an app for general distribution, it's not great. I would also mention that this will require dangerous SMS permissions, which Google has basically disallowed on the Play Store for anything except primary messaging clients, if that's a concern. – Mike M. May 01 '22 at 15:27
  • 1
    @MikeM. It is just a personal project, yeah. I need an app that sends notifications to a service outside my phone (easy part), but also ack notifications when a message is read (harder part). If I'm going to need a constantly running service anyway, I think I'll just have the app occasionally poll read state. Thank you! – Tim Morris May 01 '22 at 15:46

1 Answers1

0

Going to just resort to using an alarm or a job:

Running task periodicaly(once a day/once a week)

Not the best but not the worst solution, I feel.

Tim Morris
  • 385
  • 1
  • 3
  • 11