-
-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Export All Bookmarks buttons for easier backup and share #995
Comments
Files should be exported/imported in Google Earth compatible format, like this one: |
(optionally) automatically writing out to a bookmarks file (of choice? picked by the user using Storage Access Framework?) whenever bookmarks are changed would be really practical. Then user can have it backed up by their own means. And this is fairly small to implement |
Yeap this idea is discussed in #1871 (comment) |
@biodranik I had an idea to look into this task and would like to confirm couple of tech details before starting to go deeper. |
Another option is to save each bookmark list into its own kmz file - its a more flexible approach as e.g. a user might want to send only one list to someone. |
Indeed. I plan to use Synching to sync bookmarks to my computer, and I have to sync some lists with my girlfriend, but not all lists. I would really appreciate to have multiple KML files, one per list! |
@pastk How is it different from our current implementation? |
Let's focus on this issue, and keep privacy in mind: exporting all bookmarks/lists at once, and then properly importing all bookmarks/lists at once. Use-case: easy backing up bookmarks or easy sharing them with another user/to a new device.
|
The current implementation requires a user to export each file manually which is very tedious. Here I suggest to export all (or multiple selected) files via a single button press, but they will be separate files still. |
So we have 3 options here:
I think that if we want to target just a technical backup, option (1) is easiest, but if we need partial sharing/post processing of data separate files in (2) or (3) might be more convenient for the user. Let me know what do you think. |
I was talking about option (4): kmz file with all lists in it as separate kml files (not a single file). It is officially supported by Google Earth. An index We can make it more flexible as pastk mentioned, by allowing to export any selected lists (not just one and not just all). |
@biodranik I see, thanks for the details. So looks like the plan for this item is: Minimal set of items required for release:
Nice to have:
There is a tech question here - we need somehow to identify that this is a multi-kml kmz and instead of passing it to xml parser unpack inner kmls to some temporary path and then use existing code that do 'import all' for this folder? |
There is a tech question here - we need somehow to identify that this is a multi-kml kmz and instead of passing it to xml parser unpack inner kmls to some temporary path and then use existing code that do 'import all' for this folder? |
A zip scan should be performed to decide if there's one or more kml files inside. Note that a single kml can also contain images folder. We'll support it too. |
Thanks to @cyber-toad importing a KMZ with many KML files inside is already implemented. To finish this important backup task:
|
Are multiple files in KMZ already supported? I also linked #2220 as relevant. |
I started reading a code to implement this and have a question. For now most of the methods prepareCategoryForSharing/PrepareFileForSharing/SharingResult class/etc have categoryId as a single parameter. What do you think is a better way to rework them to mark that multi-export is required: pass some special value (like -1), add new method/classes without argument for batch export or rework old methods to accept list of categoryId (and populate it with all ids in Android/iOS code)? Technically all of them will work, just want to review these ideas before implementation is started. |
@cyber-toad thanks for asking! Looks like some functions are already working with collections ( |
This is a simple and convenient implementation of #995 where all bookmark files are exported separately using ACTION_SEND_MULTIPLE. The further work on #995 may add an additional option to pack all files into a KMZ archive. See also f1a3359 "Implement kml/kmz/kmb importer" See #955 Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
This is a simple and convenient implementation of #995 where all bookmark files are exported separately using ACTION_SEND_MULTIPLE. The further work on #995 may add an alternative option to pack all files into a KMZ archive. See also f1a3359 "Implement kml/kmz/kmb importer" See #955 Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
This is a simple and convenient implementation of #995 where all bookmark files are exported separately using ACTION_SEND_MULTIPLE. The further work on #995 may add an alternative option to pack all files into a KMZ archive. See also f1a3359 "Implement kml/kmz/kmb importer" Closes #5402 See #955 Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
Meanwhile, OpenTracks expects doc.kml in KMZ files and don't import it otherwise. |
What do we plan to do with GPX? Also pack to KMZ? |
Internally, we store everything in KML. So there is no issue with exporting of imported GPX tracks that will be in KML format. For exporting, we can either export a plain GPX (with a separate button in the UI), or export GPZ (a zip of the GPX, need to check which apps support it). |
All PRs are merged, looks like issue could be closed (I don't have permissions for it). |
@cyber-toad thank you very much and congrats for closing this epic issue! Some users demand exporting GPX now... |
Currently, uninstalling Organic Maps also deletes all user-created bookmarks and tracks (see #3504). Users who did not backup their bookmarks, are losing them forever.
Because of the privacy (no EXTERNAL_STORAGE permission), and Storage Scope restrictions introduced in Android 11, it is not possible to store bookmarks in a separate, non-removable directory. iOS has a similar situation.
Proper online backup discussed in #622 is needed in the future, but implementing a privacy-focused, easy-to-use one-button-exports-all backup (with later import/restore) scenario is critically important.
Possible implementation:
All bookmarks and tracks can be exported as a KMZ file (zip archive) with multiple KML files inside it, thus they can be imported not only in Organic Maps but also opened and edited by any other software that supports valid KML specification.
Related issues:
The text was updated successfully, but these errors were encountered: