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.79k stars 497 forks source link

Call Log Backup duplicates #615

Open jas4711 opened 8 years ago

jas4711 commented 8 years ago

The duplicate check process when taking backups appears a bit fragile. In my "Call Log" folder (not to gmail, to my own IMAP server, if that makes a difference), I have the same call being backed up with subject line of "Call with Foo Bar", "Samtal med Foo Bar" (in Swedish, my normal system language), and "Samtal med 0123456789" (phone# of Foo Bar). Would it be possible for the app to be a bit smarter about this?

I assume my usage scenario is relevant: I re-install my phone once in a while, and rely on SMS Backup+ to restore the SMS/Call Logs from the earlier phone, and then set it up to perform backups going forward. I assume the problem happens during the initial restore and initial backup situation.

Either the duplicate check should be based on a stable property (Message-Id?) or it should recognize all Subject lines, or something. I don't really know how the logic works, so it is difficult to propose a solution.

jberkel commented 8 years ago

Message ids are based on date, phone number and message type. Can you check if the message ids are different?

https://github.com/jberkel/sms-backup-plus/blob/edb5f412deb096acce079fcb2d2fdc8137e073d7/src/main/java/com/zegoggles/smssync/mail/HeaderGenerator.java#L102-L102