Maproom / qmapshack

Consumer grade GIS software
GNU General Public License v3.0
271 stars 63 forks source link

How to save a track to my android phone ? #645

Closed ventoux84 closed 8 months ago

ventoux84 commented 8 months ago

Is your feature request related to a problem? Please describe.

comment: # (A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] )After creating a track with Qmapshack, I can't save it directly to my smartphone.

I click on "save as" and a window opens to choose the destination. This window doesn't list my phone, even though it's plugged in and mounted.

Describe the solution you'd like

comment: # (A clear and concise description of what you want to happen.)I I'd like the windows shows too my phone and bee able to save my track directly into my phone, as it is possible if i save a file created with my file editor.

Describe alternatives you've considered

I need to choose a directory in my /home and then copy and paste it into the phone.

Give a reason why someone else should spend time on that request

This would make Qmapshack more ergonomic to use, and put it on a par with other installed software.

Additional context

I use Qmapshack on Archlinux with kde Plasma, all up to date.

kiozen commented 8 months ago

There is very little QMapShack can do. This is the standard file dialogue. Either your operating system is configured to properly mount your device as part of the filesystem and therefore is listed in the dialogue or your out of luck.

ventoux84 commented 8 months ago

... Either your operating system is configured to properly mount your device as part of the filesystem ...

Please tell me what my OS does bad. With others app, "save as" shows my phone.

kiozen commented 8 months ago

Does it show under "/run/user/$UID/gvfs/" ?

ventoux84 commented 8 months ago

This directory is empty. The phone is mounted under : mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1/

kiozen commented 8 months ago

In that case I can't tell. The path I provided is the usual path MTP devices are mounted to. KDE file dialogs might add some additional magic. But that is out of reach for a Qt application.

ventoux84 commented 8 months ago

I understand, it's because Halloween !!!

More seriously, thanks, i will try with Gnome and Windows 10. Is it possible with these ones ?

kiozen commented 8 months ago

Windows might work. Gnome will be the same problem as with KDE.

ventoux84 commented 8 months ago

Done with Ubuntu Gnome 22.04 => it works ! With Debian 12 KDE => it does not.

mitxel-m commented 8 months ago

Hi @ventoux84

This is what works well and fast for me with QMS:

I often want to transfer gpx files from QMS to my smartphone. I use orux , so I want to put them in the /oruxmaps/tracklogs folder on the external SD. For convenience I have created a permanent shortcut pointing to that folder in the file explorer widget that QMS uses. That way I can access it with one click.

To create the shortcut ( you do this only once):

Do 'Save as...' to open the file manager, then...

Selección_104

1- click on my PC, then on the right panel it will show /

2- Navigate from / to the folder where the device is mounted, in my case

/run/user/1000/gvfs then mtp://MY_PHONE_NAME/MY_external_SD, then oruxmaps, so you can see the tracklogs folder

3- Drag and drop the tracklogs folder to the left panel and the shortcut is created.

The next time you want to save a file just click on the shortcut tracklogs and you can save to that folder without any more clicks.

Obviously the device has to be mounted first, otherwise the shortcut will be greyed out.

The good thing is that the shortcut is saved for any time you open a file explorer in QMS, i.e. if you want to load a file from the smartphone to the workspace you have it there too.

The only thing that is not working correctly for me is creating and renaming a new subfolder in that location. It creates the new folder but fails renaming it. For now I have to do that outside of QMS, it is not nice but it's not very hard because I also have a shortcut to that location in my system file manager.

I am on Linux Mint 21 with Qt 5.15.3.

ventoux84 commented 8 months ago

Thanks, but you are using Gnome, my question is for KDE Plasma. The file-piker called by Qmapshack does not show any shortcut to remote, and the phone is mounted as remote in mtp:/6045Y/Espace de stockage interne partagé/oruxmaps/tracklogs/ And yes, Oruxmaps is a very useful app.

EDIT : i saw that https://askubuntu.com/questions/1339104/what-is-the-android-phone-mtp-mount-point-in-kubuntu-20-04-if-not-run-user-10

Then i applied that and it works as a bypass. https://askubuntu.com/questions/1346885/how-to-access-mount-android-drive-in-kubuntu-20-04-with-other-file-manager-than Installing go-mtpfs and running "go-mtpfs android" to mount the phone on the directory "~/android". Then "android" is seen as local directory and shown by the file-piker when i "save as" in Qmapshack. KDE's way of doing this thing is like a witch's trick: there's nothing magical about it, and it's quite penalizing. But i still run Plasma, Gnome is worst for me.

kiozen commented 8 months ago

I have to use Gnome workwise since a few years. Lately I start to favor it over KDE. It's less overfraught with useless stuff. On my private laptop I installed Mint. It's surprisingly well configured right out of the box.

But let's summarize:

I guess we can close the issue with that?

ventoux84 commented 8 months ago

Yes of curse, it's well summarized.