How to sync add-on data between desktop and Android

I have several userscripts that that I wrote for various forums that store data, such as the latest post read in a thread or last date I looked at a board. I store this in local storage, typically a few hundred short records. This worked fine while I was mainly using a single computer.

I’m now swapping regularly between Firefox on a desktop and Fennec on Android so I’m looking for a simple way of syncing this data. I can easily convert my userscripts into content scripts, and my first thought was to use simple storage. But I read that simple storage is probably not sync’d, and certainly not between desktop and Fennec.

Is there any way I can sync this data using Firefox sync? If I have to build a custom ‘sync server’ for this data. any suggestions as to how I might go about this?

TIA
Dave

1 Like

Sync happens over Firefox Accounts now. The docs aren’t very clear on how to add your own data, or whether simple storage is supported. There is some contact information there that might be a good start, though.

I think that the ‘proper’ way to sync my own data is to create a Basic Storage Object (BSO) as in this spec:
https://docs.services.mozilla.com/storage/apis-1.5.html
That mentions the BSOs used by Fx sync. (It doesn’t mention add-ons, though - probably incomplete.)
Whether that can be added to the sync server used by Fx Accounts I don’t know - I’d probably run my own sync server if I go that way.

But that’s all a bit complicated for this use case. I’m looking for something simple. I thought I’d found it by using bookmarks - these are sync’d between desktop and Fennec. If the volume was small I could disguise my records as bookmarks. But SDK/places/bookmarks isn’t supported on Android.

Have you figured it out, by any chance? I’m very much interested in Sync support.

No. I worked out a solution involving xmlhttprequests to a webserver on a Raspberry Pi, but I shelved it for now.

Bug for syncing Simple Storage: https://bugzilla.mozilla.org/show_bug.cgi?id=1024060