octoshrimpy / quik

The most beautiful SMS messenger for Android - Revived
GNU General Public License v3.0
734 stars 31 forks source link

:pencil2: [FEAT REQ] Remove messages from android message provider #20

Open octoshrimpy opened 1 year ago

octoshrimpy commented 1 year ago

DESCRIPTION

I want to have my messages only in qksms and not in Android message store. That way, no other apps requesting messages permission can see all my messages.

This can be a very well opt-in feature. Meaning, in preferences, use can toggle this on and this feature can start working.

I have tried implementing this myself. I wanted to check your opinon on the feature itself and implementation.

As of now, I have created a repository that can take care of removing messages from Android datastore.

interactor/ReceiveSms.kt this interactor receives the messages that have just arrived to device. It stores in db. After this step, I am calling the new repository to delete the messages from Android store. For this I am passing same messages that were received

This new repository is calling

SqliteWrapper.delete(context, context.contentResolver, Telephony.Sms.CONTENT_URI, "${Telephony.Sms.ADDRESS} = ?", arrayOf(it))

Note: Also for this to work, I needed to add a delay of 3 seconds (generic) before this operation. Else even our app is not storing the message :)


https://github.com/moezbhatti/qksms/issues/1771

octoshrimpy commented 1 year ago

this must be opt-in, and there must be a better way to avoid the sms store altogether. will require more research