jberkel / sms-backup-plus

Backup Android SMS, MMS and call log to Gmail / Gcal / IMAP
https://play.google.com/store/apps/details?id=com.zegoggles.smssync
Apache License 2.0
1.8k stars 499 forks source link

Handle RCS messages properly, and improve group MMS #1097

Open locofocos opened 1 year ago

locofocos commented 1 year ago

Fixes #1055 and #1027

This fixes RCS importing 🎉

It also improves how group MMS threads are imported. Basically it includes all the recipients in the "to" field, and puts everyone's name in the subject, so that gmail does a much better job mimicking the group threads on your phone.

I've been toying around with it on my Pixel 3a running Android 10. I've tested with a mix of SMS, group MMS chats, and RCS chats.

I'm completely open to the idea that I was a little heavy-handed with my refactor. I ran with what made sense. I'm fine if someone else wants to take this as as proof-of-concept and run in a slightly different direction to make this mergeable.

TODO

Testing

Tips for testing:

Some test cases that I've gone through on my phone, and verified that the backup looks correct in Gmail:

Adopting this new version

Here is my 2 cents for how affected users could get their backups into a clean-ish state:

kurahaupo commented 1 year ago

@locofocos Thank you so much for doing this; it will close a large number of outstanding tickets.

I will review in detail shortly.

(It will still be up to @jberkel to publish to Google Play.)

kurahaupo commented 1 year ago

I'm really happy with the separation of records into sender and recipients. This will fix not just RCS, but almost every issue in the "half missing" category.

Again, many thanks.

locofocos commented 1 year ago

@kurahaupo you're welcome! Thanks for the initial review. I'll get this cleaned up and tested further some time soon, I hope.

locofocos commented 1 year ago

@kurahaupo I've given this some solid testing on my phone, and I'm happy with the result.

Is the travis CI build running against this PR? I was looking for the build output so I could at least see which tests I need to update.

edit - I might need some some more time to look over the results and debug more. All of those test cases look good. But I did a another huge backup last night, and I'm seeing some ungrouped messages.

kurahaupo commented 1 year ago

I'll check on the CI when I get home to my PC

hubono commented 1 year ago

Hi I tried to compile from source but it keeps failing. Can someone post an APK please

locofocos commented 1 year ago

@hubono I debated whether I should post a copy of my latest APK build, just in case life happens and we don't get this PR merged.

Caveats, if this wasn't obvious:

However, I've been using it for months. No promises, but I'm happy with the results. So here is the APK I built locally from ac71d552e62

SMS backup plus with RCS fix v2.apk.zip