Skip to content
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

[android] Direct device-to-device sharing of map files #1801

Open
rtsisyk opened this issue Jan 8, 2022 · 9 comments
Open

[android] Direct device-to-device sharing of map files #1801

rtsisyk opened this issue Jan 8, 2022 · 9 comments
Labels
Android Android development Enhancement New feature or request, an improvement of some existing feature Raw Idea An idea that needs to be elaborated

Comments

@rtsisyk
Copy link
Contributor

rtsisyk commented Jan 8, 2022

Problem

I am hearing countless complaints that the maps directory is not accessible anymore. Unfortunately, we have some technical limitation on Android 11+. There is no convenient way to use the shared storaged anymore.

Solution

The typical use-case is to transfer maps files from device to another without having the Internet connection. For example, you have a map downloaded, but your fellow traveler doesn't. Instead of thinking about raw access to the private storage, we can implement direct device-to-device sharing.

The workflow is the following:

  1. Open the list of maps on your device
  2. Select one particular map or entire country
  3. Click "Share" button
  4. Android will show the system sharing dialog with multiple options
  5. On the second device, receive a file and open it via Organic Maps app
  6. The app will open the map file and import it into the private storage

The beatify of this approach is that users will have numerous options to exchange maps files:

  • Bluetooth
  • Nearby Share
  • Quick Share
  • Save as file
  • WhatsApp
  • Telegram

Plus it provides a convenient method to test custom/new maps.

CC: @biodranik @vng

@rtsisyk rtsisyk added Android Android development Raw Idea An idea that needs to be elaborated labels Jan 8, 2022
@biodranik
Copy link
Member

biodranik commented Jan 8, 2022

I don't think that you named the main problem. From our users and from the past, the more actual problem was this one:

  • There is no Internet access on the device (or it is very slow). Think about the Haiti disaster.
  • APK is available and installed.
  • Maps are downloaded manually on some PC using the mirror (or are brought on a USB stick).

The goal is to copy (import) pre-downloaded maps on the device somehow. Do you see any solutions for that?

@rtsisyk
Copy link
Contributor Author

rtsisyk commented Jan 31, 2022

The goal is to copy (import) pre-downloaded maps on the device somehow. Do you see any solutions for that?

Sorry for the late answer. Sure, my proposal solves exactly this problem. Android supports numerous ways to share files via Sharing menu. Some of them don't require the Internet connection at all (e.g. Bluetooth and Nearby Sharing). You can transfer map files from one device to another easily without need to have the storage access.

@batyrmastyr
Copy link

batyrmastyr commented Feb 1, 2022

Android to android sharing is very good start, but Android to iOS sharing is also needed. Use case: I have iPhone, my wife prefers Android and we usually forget to download some maps on one of the phones.

@biodranik
Copy link
Member

That in theory could be done via a Bluetooth Sync.

@rtsisyk rtsisyk added the Enhancement New feature or request, an improvement of some existing feature label Feb 21, 2022
@pastk
Copy link
Contributor

pastk commented May 20, 2022

Technically, another way to share map files will be by implementing a DocumentsProvider for them - hence the files will be visible and copiable via a file manager. Its just an assumption based on reading the docs so far :)

@RedAuburn
Copy link
Sponsor Member

For anyone trying to load mwms with root access, the maps are stored at /storage/emulated/0/Android/data/app.organicmaps/files/{6 numbers - map generation date}

@0709wiwiwi
Copy link

For anyone trying to load mwms with root access, the maps are stored at

Given Android is increasingly closing down access to data, apps like Cruiser & Locus offer alternative storage choices into media (internal or extsd). The access control drift in here still appears to be slightly more tolerant so far.
Example: /storage/1BA0-1D11/Android/media/gr.talent.cruiser/maps

@biodranik
Copy link
Member

These apps have unsafe android.permission.WRITE_EXTERNAL_STORAGE permission. If you use external storage in OM settings, in most cases you usually are able to access maps using adb.

@0709wiwiwi
Copy link

0709wiwiwi commented Nov 27, 2023

Someone with too much fear of the outside world should already better not own any electronic device ?

Anyway @biodranik I wanted to know the ins and outs of it. I am not a dev so I have to inquire. The answer (cruiser) was.
Cruiser (and other apps like c:geo) declare the WRITE_EXTERNAL_STORAGE only for use up to Android 9 (Pie).
And this is only a requirement of "Android download manager" and only for old Android <= 9.
Cruiser does not need/use storage permissions at all because it uses app folders (data or media) or Android browser that do not require storage permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android development Enhancement New feature or request, an improvement of some existing feature Raw Idea An idea that needs to be elaborated
Projects
None yet
Development

No branches or pull requests

6 participants