SmsFixer

From GaProgMan's Wiki
Jump to: navigation, search

SmsFixer is an open source console application, written in C#, for processing multiple copies of messages in conversation threads from an SMS backup XML file.

SmsFixer
Original author(s) Jamie
Developer(s) Jamie
Development status Active
Written in C#, .NET 4.5
Available in English
License GNU GPLv3
Website www.github.com/GaProgMan/Smsfixer

Source Post Mortem

The application uses C# and Dot Net 4.5 and is run from the console.

Process

When the application is run, it checks the folder that it is in for a file called "sms.xml". If this file is present, then it parses the files contents into a list of messages - an example of a message found in the xml file can be found in the following section).

The list of messages is grouped by their body text (selecting all common messages into a separate list of messages. Then the first item in that list is selected and stored in a separate list. This process is done for all messages in the grouped list.

The resulting list is then sorted by date set, and serialised back to an xml file called "sms-noDuplicates.xml" (this is stored in the same folder as the application and the initial XML file.

Project Description

Jamie uses Sms Backup and Restore to keep a backup of his SMS and MMS messages. This particular app backs up all applicable messages and call logs in XML format, and example of which can be seen below:

    <sms protocol="0"
       address="07123456789"
      date="1375363837534"
      type="2"
      subject="null"
      body="I think I found the penguin button! "
      toa="null"
      sc_toa="null"
      service_center="null"
      read="1"
      status="0"
      locked="0"
      date_sent="1375363865996"
      readable_date="1 Aug 2013 14:30:37"
      contact_name="Vincent Realperson" />

After upgrading the version of Cyanogenmod (which required a full wipe of the software) onto his phone, something became unstable while he was restoring his SMS messages. After the restoration of SMS messages, Jamie found that he had multiple copies of each message for each conversation thread.

A full write up of the issue can be found at his blog here

Source

The latest version of the source code can be found at Jamie's GitHub repository for the project: www.github.com/GaProgMan/SmsFixer