osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.64k stars 1.01k forks source link

Settings Export goes to Share With App, not to save file #12264

Open lunkhub opened 3 years ago

lunkhub commented 3 years ago

Description

Settings Export does not show option to save file on device. Note/edit: Choosing Email app will attach a Export...osf file to an email. Then attachment can be saved. Have not yet tested Import to verify it works.

How to reproduce?

OsmAnd, Settings, Export, Select data to export, Continue, Wait, See "Share With" dialogue.

Your Environment

OsmAnd Version: 3.9.10 (From F-Droid added 3/16/2021) Android/iOS version: 11 Device model: Nexus 6 (de-googled)

Maps used (online or offline):
If you have an issue related to offline maps, tell us the exact name of the map file where the issue occurs and its edition date. Offline, but not selected for backups.

vshcherb commented 3 years ago

It's more convenient cause you can share it immediately with messenger or email app

lunkhub commented 3 years ago

@vshcherb Export, for me, is not to share. It is for backup. Also, if you do export offline maps, it will be much too large to send by email or messenger.

ManDay commented 2 years ago

It's more convenient cause you can share it immediately with messenger or email app

It's not at all more convenient if you can not use your email or messenger app to transfer the data (which, I think, is rarely the case).

The absolutely only way to use OsmAnd's backup which I have found is to install (or re-enable the preinstalled one, for that matter) e-mail app and then extract the file from the attachment.

At the very least, the choice "Back up as file" shown in the backup screen should be renamed to "Share to other app", otherwise it's simply wrong. OsmAnd does not support backing up the data as a file.

pebogufi commented 2 years ago

If you use the share function you can then select a file manager to share. The file manager then saves a file. I use Total Commander (TC) as file manager. In TC you can directly ZIP that file which is very convenient for some purpose. So this is a convenient workaround for share when you want to do a (good old) "save", only one click more.

lunkhub commented 2 years ago

to do a (good old) "save", only one click more.

For me, with Lineage / aosp default file manager, this does not work. File manager is not on the "share to" list.

Also, I have to actually send the email to myself to save the attached file (k9 mail); saving from draft does not work, which wastes bandwidth.

Note: over time, this is now called Backup/Restore, to file, under settings. IMO it is a bug, not "nice to have". Adb sdcard copy still seems to work OK for backups, but I have not actually "restored" more than one track file in some time.

pebogufi commented 2 years ago

@lunkhub I confirm that default filemanager of android is NOT in the list of available share apps for andoid 8 and 10, but what about an external one like Total Commander for your problem with Linage ?

ManDay commented 2 years ago

Same, zhanghai/MaterialFiles does not show as a target.

IzzySoft commented 2 years ago

And what's more: I have a device that went broke. After seeming to be a brick and just lying around, I finally managed to start it up again – but: No network anymore. As @pebogufi and @lunkhub already stated, no file manager in the share targets (yes, I'm on LineageOS, too). adb backup yielded an empty file (despite the ALLOW_BACKUP flag being set) – so without root and TitaniumBackup… well.

If I could really "export to a file" and store it on the external SD card, I could take my settings over to the new device. Now I can't, as there's no suitable app showing up in the share menu. If I choose "Bluetooth", though I can select the new device as a target (where OsmAnd is already installed on), I just get a toast saying the file was not shared.

Now, even if I did have a network connection: How am I supposed to share a 2 GB file? By mail? Messenger? This simply does not work. And definitely is not "more convenient", just the opposite. Maybe at least include some SAF option to "share to my SD card"?

Luckily, k9 was still installed on the device, so I just shared most things (except the maps) the way @lunkhub did and extracted it from the unsent mails (remember: no network) to the local storage, where I was able to pull it from using ADB. Copying the entire OsmAnd folder from the card I might even get the maps over and all (or in the worst case simply have to download them again) – which for maps might even be the better way, avoiding to duplicate 2 GB via backup and restore.

I agree, a direct share option may be convenient for parts of that if I wanted to share something. But it's not what the menu suggests (backup to file). To bring both together: Maybe rename the "Continue" button to "Share" (with the current functionality) and add a second button "Save locally" (calling the DocumentProvider's proper intent to bring up the SAF dialog asking where to store the file)? That would be much appreciated – and satisfy both parties (hopefully :smile:).

(sorry if the above sounds like a rant: it's not meant that way. It should just visualize the situation and the frustration it can lead to – and offer an option we all can live with. Thanks for all your hard work on OsmAnd!!!)

cahlenlee commented 10 months ago

This is a serious usability bug. If the user doesn't have an app that can save to disk then they can't export. My backup is far too big to email to myself.

I'm shocked this major bug has been open for two years.

scaidermern commented 10 months ago

It's more convenient cause you can share it immediately with messenger or email app

In some cases this is nice, in others it isn't.

Please create a dialog with options, something like: [save] [share] [cancel]

ManDay commented 10 months ago

I think using "Share" is conceptually sound (although by https://github.com/osmandapp/OsmAnd/issues/12264#issuecomment-1133826312 it shouldn't be called "Export to file"). An integrated file-saver dialog should not be required. What's actually missing is a correct end-point (share-to app) which saves the shared data to file.

dmpr0 commented 9 months ago

https://github.com/osmandapp/OsmAnd/issues/11789

gerardlt commented 8 months ago

While I understand the argument for "share" - it seems in-line with an overall view of the direction of travel of Google / the Android API - as a feature that explicitly provides a(n implicitly low-level) means for the user to actually get hold of their data, it seems to me that it would be better for there to at least be an option to save a file directly with no intermediary.

I also think it's worth considering that "Import from file" takes the user to a file selection screen, so from a user perspective, there's a bit of asymmetry between the two actions at present.

puchu commented 4 months ago

sharing doesn't seem to work, when the data is a few GB (when including locally stored map data).

i tried to export all my local maps, to avoid downloading them again but it doesn't work.

ManDay commented 3 months ago

FTR and anyone interested, I've been using Save Locally as the Share-To target and it works like a charm.

puchu commented 3 months ago

and now please download maps with at least 5gb and share your maps and settings, does it still work? here it doesn't

sonora commented 3 months ago

@puchu Save Locally has a new version v1.2.3 published June 12 which claims to have fixed their former bug with big files.

An alternative seems Save To...

AndySchroder commented 4 weeks ago

I've discovered that after cancelling the "Share With App" prompt, if you plug in the USB cable into your computer and navigate to Internal shared storage/Android/data/net.osmand.plus/files/temp/ there will be a file of the form Export_2024-09-07.osf. You can copy that to another phone and it will import.

However, because of https://github.com/osmandapp/OsmAnd/issues/20718 , I am getting limited use of this file.