Tranquille icon indicating copy to clipboard operation
Tranquille copied to clipboard

Allow other apps to query Tranquille

Open Penaz91 opened this issue 1 year ago • 4 comments

This is just an idea that dawned on me yesterday after receiving a scam SMS (Broken Phone/Hi mom scam): it would be nice if Tranquille allowed a set of applications to interrogate its database for possible spam/scam numbers.

I know for a fact that "ShouldIAnswer" (or "SIA?") supports reporting numbers for spam/scam SMS, so it would be interesting to see integration from other software (like QUIK or Fossify Messages) with Tranquille.

For security and privacy reasons, this should be done via an allow-list kept inside Tranquille, much like Breezy Weather does with the "Send Data to other apps" functionality.

Penaz91 avatar Apr 23 '24 07:04 Penaz91

The spam database is not implemented in Tranquille directly. You can integrate it to your project by implementing this library: https://gitlab.com/xynngh/LibPhoneNumberInfo

[versions]
lib-phone-number-info = "c77bdd2b69"

// ...

[libraries]
lib-phone-number-info = { group = "com.gitlab.xynngh", name = "LibPhoneNumberInfo", version.ref = "lib-phone-number-info" }

papjul avatar Feb 09 '25 08:02 papjul

That is true, but implementing it would mean having two offline databases that are essentially the same (one for Tranquille and one for the SMS app), hence the idea of allowing apps to go through Tranquille to be able to avoid such duplication.

I'm not an android developer and I imagine there are some limitations in communicating between apps, but I felt like throwing the idea out there to see if it can be done.

Penaz91 avatar Feb 09 '25 18:02 Penaz91

Yes, the broadcast method used by Breezy Weather is subject to a 1 MB limit. It is starting to cause us issues. We are looking into content providers, which are also limited to 1 MB, but per row, so it will be safe.

To get back to Tranquille, what are you trying to achieve? I know that starting from Android 7, there is a common system block list that can be used by dialer and messaging apps. I don't know if it would be a good thing to store spam numbers there, and if the blocked list is designed to support such a long list. (Note that Tranquille is forked from a very old app that wasn't designed to use that list for the manually input "denylist", but modern apps like Fossify use it, for example)

papjul avatar Feb 09 '25 18:02 papjul

The final objective would be having SMS apps warn you about possible spam through a local database (that is not just Android's default deny list) while saving on duplicates between caller-id apps (Tranquille) and the SMS apps.

Not sure if there are other use cases 🤔

But in the end, if this is not possible (or turns out to be a headache) then it's all good :)

Penaz91 avatar Feb 09 '25 18:02 Penaz91