I'm making a WebExtension (for Firefox) that tracks lists for the user. The user can add/remove elements from a list, or switch an element from one list to another, which means the extension needs the most recent version of the lists to work with.
So to be used on both desktop and Android, the extension needs to transfer/synchronize some data (which can be stringified).
I'm trying to find a way for the user to do it as simply as possible, without using external services.
The ideal solution for that (completely transparent for the user) would be to use storage.sync
, but although it does synchronize between devices, it doesn't (yet) sync between normal Firefox (desktop) and Firefox for Android (implementation tracked at https://bugzilla.mozilla.org/show_bug.cgi?id=1316442).
Another solution would be to use the bookmarks
API, but it's not supported by Firefox for Android (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks) either.
That leaves me with two solutions that I can see:
Letting the user save/retrieve the data to/from a local file, which means they need to copy the file to the other device (that's what I have in place right now).
Saving/retrieving the data to/from a third-party server (which means I would have to create a server, and have the user make an account on it).
Is there any other solution that I'm missing?
Make sure you are signed in with the same Firefox account and that bookmark syncing is turned on for both mobile and desktop. If the issue still persists, sign out of your Firefox account and sign back in, making sure that bookmark syncing is enabled. All done.
According to this support document, the following data is synced from/to Android: bookmarks, history, open tabs, form information and passwords.
This chart shows which web extension APIs are supported on Android:
Not mentioned in this list, but also synced is BrowserSettings
. It allows overwriting some fields that are synced (homepageOverride
, newTabPageOverride
), but those fields have to be defined in manifest.json so they cannot be dynamic. Also, it would probably interfere with normal functioning.
In conclusion: wait for browser support or pick a server solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With