tmo1 / sms-ie

SMS Import / Export is a simple Android app that imports and exports SMS and MMS messages, call logs, and contacts from and to JSON / NDJSON files.
GNU General Public License v3.0
360 stars 39 forks source link

Restore creates dublicates #91

Open Solar-Simon opened 1 year ago

Solar-Simon commented 1 year ago

Hello there, for some time I switched several times between two phones. Sms-ie is the best solution for me to quickly move my Sms and call logs.

After some time I realized Sms counter has exploded. Now I have several duplicate of my Sms.

So recovery of the backup is more a inclusion of the backup. Guess I always had to erase existing Messages first.

My expected behavior would be, when I restore a backup, I get exactly the data of the backup. And not a mix of existing data and backup.

Now that I now, it's easy to change my workflow. But how do I remove all that Duplicates?

tmo1 commented 1 year ago

The behavior you describe, as well as the solution you arrived at of wiping messages before restoring, is discussed in the README. The reason the app does not attempt to avoid message duplication is that it can be tricky to ascertain if two similar looking messages are identical, when some of the metadata is the same but some different.

I don't currently have a good way to get rid of duplicate messages in an existing collection of messages. It would not be too difficult to write a script to identify and remove duplicates, once the above problem has been addressed.

tmo1 commented 1 year ago

I'm going to leave this issue open, as a place for discussion of the feasibility and desirability of implementing some sort of deduplication, but I don't currently have any plans to implement anything.

maverick74 commented 1 year ago

If not a duplicate, this is, at least, related to #58 .

@tmo1 That SMS-DB system you talked about to avoid duplicates would be indeed very handy...

tmo1 commented 1 year ago

Noted. I'm not sure I plan to implement deduplication in SMS I/E, but I'll consider it.

Emporea commented 1 year ago

Ok so this happened to me too now. Any suggestions on how to remove duplicates from the backup json file?

tmo1 commented 1 year ago

Not at present - sorry. If I do implement something, I'll try to remember to post it here.

farfromrefug commented 1 year ago

@tmo1 could you implement a wipe for call.logs ? Right now I end up with duplicates after backup/restore

tmo1 commented 1 year ago

could you implement a wipe for call.logs ?

Android has call log wiping built in.

farfromrefug commented 1 year ago

@tmo1 I see. It can be done programmatically as other apps do it. Would be nice to have it in the app. Maybe even as a prompt option when importing calls.

tmo1 commented 1 year ago

It can be done programmatically as other apps do it. Would be nice to have it in the app. Maybe even as a prompt option when importing calls.

I'm not sure I see the point in duplicating native Android functionality, but I'll consider it.

farfromrefug commented 1 year ago

@tmo1 It is all about user experience. like the fact that you dont propose to set the dedaur message app from the app. it is like permissions. they can be set from app info but as app devs we ask them from our apps to have a better user experience.