Closed Bug 1056836 Opened 12 years ago Closed 9 years ago

[B2G][SMS] Allow import/export SMS

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: GeekShadow, Unassigned)

References

()

Details

It would be nice to have an import/export feature for SMS. Several user cases: * Migrate from Android to Firefox OS * Upgrading to a fresh Firefox OS without SMS * Sync SMS on cloud platform We could use XML format which is used by this Android App: https://play.google.com/store/apps/details?id=com.riteshsahu.SMSBackupRestore&hl=fr But I assume a JSON format would be better.
I looked at https://github.com/frayar/SMSBackupRestore which exports the SMS into a XML file. The lack of restore feature seems to be due to the MozMobileMessageManager API which cannot do this.
What I personally do to backup and restore contacts and sms: mkdir backup # plug device to backup adb shell stop b2g adb pull /data/local/storage/persistent . adb shell start b2g # plug device to restore cd chrome/idb adb shell stop b2g for i in *csot* *ssm* ; do adb push $i /data/local/storage/persistent/chrome/idb/$i ; done adb shell start b2g Not sexy but effective...
Note: you can only restore the database to the same or a more recent version of Firefox OS !
On my Geekpshone Peak, I can import/export SMS data without any problem, but on the ZTE Open C, I can't get access to the "/data" directory. I can export them thanks to the App SMSBackupRestore but the SMS API don't provide any import method. That's why I hope this import feature will be added to the SMS API.
One thing I have in mind is that an "import" app could simply expose this data as datastore, without actually importing the data in the main database. This would need the threading logic in Gaia obviously. It could be too complicated for the use case though. Any other thought Bevis?
Flags: needinfo?(btseng)
IMHO, there is no easier way to export/import message data correctly, this will be a big and an interesting challenge and can be divided into follow items: 1. Define the layout of the exported message to completely present not only an SMS message but also an MMS message (MMS includes richer content including optional subject, SMIL, text, multimedia attachements, vcard, vcalendar, and etc. [1]) 2. Define a new API in MozMobileMessageManager similar to |send| and |sendMMS| to save each message into database. [2] 3. Regarding the threading logic, it has to be covered in MobileMessageDB while saving a new message by checking the message type (incoming, outgoing) and the orignator or the recipients of the message. 4. Optional, the internal implementation of MobileMessageDB [3] might have to check if the import message is redundant to the one that already store in the DB when possible. [1] http://technical.openmobilealliance.org/Technical/Release_Program/docs/MMS/V1_3-20110913-A/OMA-TS-MMS_CONF-V1_3-20110913-A.pdf [2] http://dxr.mozilla.org/mozilla-central/source/dom/webidl/MozMobileMessageManager.webidl [3] http://dxr.mozilla.org/mozilla-central/source/dom/mobilemessage/gonk/MobileMessageDB.jsm
Flags: needinfo?(btseng)
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.