andreynovikov / trekarta

Simple, responsive map for your trek. You decide how to journey today, not the application!
https://trekarta.info
GNU General Public License v3.0
169 stars 25 forks source link

Share a track is not working for phones without GMS (Huawei...) #226

Closed jpiebrig closed 6 months ago

jpiebrig commented 7 months ago

Thanks a lot for your good job, I like Trekarta a lot and what follow is not a bug. But it is only possible to export "Native" track. "GPX" and "KML" are not working for phones without GMS due to lack of them I think. And I haven't find any solution to convert native tracks (.mtrack) to anything else. Any solution will be appreciated ;-)

andreynovikov commented 6 months ago

No it does not depend on GMS. What happens when you select GPX or KML format and press "Contnue" button?

jpiebrig commented 6 months ago

Thank you a lot to worry about my probem ! 🙂

My phone is a Huawei Mate 40 Pro - NOH-NX9. No Google at all. I join a video explaining my problem and what you ask. I write you also if you don't understand my very bad English : https://www.grosfichiers.com/KYyyNwhQFda

I select the file to share and then select GPX format (with KML format it is the same). On the next screen I can choose the way to share the file. You can see that the GPX file seems to be there and the file size is about 200 ko. I choose to share the file with e-mail - GMX mail - and you will see on the next screen that there is a black band saying that the file could not be join in attachment. Anyway, I try to send the mail but when I receive it, no attachment. I have try to share the file in a lot of ways, Whatsapp, etc..., but it is the same : nothing. I tried also, when I saw that there was a GPX file, to go in Android - data - mobi.maptrek - files - data but nothing in GPX. Nothing also in cache - export

andreynovikov commented 6 months ago

Ok, I've got it. I have more questions:

  1. After you press "Continue" and then see the list of apps can you find Trekarta (Trekarta import) in that list? If yes what happens if you choose it?
  2. After you press "Continue" and then see the list of apps do not select anything, do not close Trekarta, but switch to your app launcher and run your file management app, go to Android/data/mobi.maptrek/cache/export/ - can you see created file there?
jpiebrig commented 6 months ago
  1. After I pressed "continue" I can see the list of Apps and Trekarta is among it. If I choose Trekarta a small window open where it is writed : "Trekarta Import - Failed to get file".
  2. After I pressed "continue", I go straight to Android/data/mobi.maptrek/cache/export/ with my explorer and /export/ is empty (I had done that a lot of time to see). But it seems to have had something a few time ago because under Export the date is : "à l'instant" ("just now")

Have a look on the video if you don't understand what I mean in point 2 : https://www.grosfichiers.com/8a9GqLwjxN9

andreynovikov commented 6 months ago

I see. Something is constantly removing files from cache. It's ether some excessive resource management phone settings or some third party application. Your cache directory is empty but it should contain many files:

Screenshot_20240109_233526

At least there permanently should be the mapIndex file if you have ever downloaded any map.

jpiebrig commented 6 months ago

I had downloaded some charts previously and try again now. I found 2 files in "cache" : hillshadeindex and mapindex. But still nothing in "export". I will try to find which application or setting causes this. I never had such strange behavior before. If I find I will tell you. Thanks a lot for your help.

On 09/01/2024 21:42, Andrey Novikov @.***> wrote:

I see. Something is constantly removing files from cache. It's ether some excessive resource management phone settings or some third party application. Your cache directory is empty but it should contain many files:

Screenshot_20240109_233526.jpg (view on web) https://github.com/andreynovikov/trekarta/assets/2943625/7c08b3ff-ce00-4137-8995-e410e33d6680

At least there permanently should be the |mapIndex| file if you have ever downloaded any map.

— Reply to this email directly, view it on GitHub https://github.com/andreynovikov/trekarta/issues/226#issuecomment-1883762472, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHCAPVOHA3745BBWC253RLYNWTSPAVCNFSM6AAAAABBIDE2W2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBTG43DENBXGI. You are receiving this because you authored the thread.Message ID: @.***>

jpiebrig commented 6 months ago

I have an other phone, a Huawei Mate 30 Pro - LIO-L29. On this one I have the GMS installed (and not on the NOH-NX9, I didn't find how to...). So I have just installed Trekarta on the LIO-L29, loaded a map and made a small track. And when I tried to export it, it is the same as for the NOH-NX9 : nothing in /export and sharing is not working. I have changed some settings about cleaning the caches but noway.

jpiebrig commented 6 months ago

Other curious thing. If I share a native track, when I push on the "continue" button and then without doing anything else in the application, I go straight to see /export with my explorer, it is the same there is nothing in it. But if I go back to the application and share again a native track, i can export it with mail, Whatsapp or others, and it works. So a .mtrack file can be shared, but not a .gpx or a .kml file. And for the 3 formats there is nothing in /export after pushing "continue"

andreynovikov commented 6 months ago

This is because native track is shared directly, not via export folder.

  1. How do you install Trekarta on Huawei?
  2. Are there any files in cache folder at all?
  3. Can you see any files in Android/data/mobi.maptrek/files with your file management app?
jpiebrig commented 6 months ago

I have installed Trekarta with F-Droid on my phone Huawei Mate 40 Pro - NOH-NX9 and with the Playstore on the Huawei Mate 30 Pro - LIO-L29

In the cache folder there are :

  1. the folder "export"
  2. the file "hillshadeIndex"
  3. the file "mapindex"

In the Android/data/mobi.maptrek/files there are :

  1. the folder "data" with my mtracks in it
  2. the folder "databases" with 4 files .sqlitedb and .sqlitedb-journal
  3. the folder "native" with 6 files
andreynovikov commented 6 months ago

So there are other files in cache. Good news. Bad news is that I never remove files from cache. I will add logging to file so we can examine logs and will get back to this issue.

andreynovikov commented 6 months ago

Please download apk from https://github.com/andreynovikov/trekarta/releases/tag/2024.01-alpha install it manually on test phone, run it as usual, try to export track and then close Trekarta normally. Then go to Android/data/mobi.maptrek/cache/export/ and find debug.log there. Please attach it here.

jpiebrig commented 6 months ago

I do what you ask and here is the debug log debug.log

andreynovikov commented 6 months ago

Thank you for your efforts. After analyzing the log I've found a place where the problem occurs. Now I have to understand the cause of that problem. I have added more logging and uploaded new APK. Can you please download and install it (same link), repeat all the steps and attach new log file.

jpiebrig commented 6 months ago

I have uninstalled the previous beta version and installed the new one. Then I put a mtrack into Android/data/mobi.maptrek/files/data/ and try to export it. And it works ! Here are the files which where in /export debug.log exception.txt mer. 3 janv. 2024, 13_32 – 15_18.txt you must rename the last .txt in gpx Great !

jpiebrig commented 6 months ago

I have tried with the other Huawei (Huawei Mate 30 Pro) and export is working also. I can send the gpx file by mail

jpiebrig commented 6 months ago

When I share with mail or WhatsApp, there is no problem. But if I share with Mixplorer with "copy to...", Trekarta crashes, but I still can copy the file.

andreynovikov commented 6 months ago

Can you attach debug.log and exception.txt after crash?

jpiebrig commented 6 months ago

Most of the time Trekarta crashes as soon I press "continue" after choosing the track. But the track is still there and usable. I join the 2 files : debug.log exception.txt

andreynovikov commented 6 months ago

I have completely replaced export module in latest version (2024.01), please try it and report any problems.

jpiebrig commented 6 months ago

I cannot install the new version because it only on Google Play Store and I don't have it... I have try to install it on the Huawei Mate 30 Pro and extract the APK to install it on the Huawei Mate 40 Pro, but it doesn't work.

jpiebrig commented 6 months ago

I just try it on the Mate 30 Pro which has GMS and it seems to work. Need to do more tests

andreynovikov commented 6 months ago

It will be automatically published on F-Droid soon

andreynovikov commented 6 months ago

BTW, are you a native french speaker? May be you can help localize Trekarta?

jpiebrig commented 6 months ago

Yes, I am french. What do you mean by localize, translate ? --Envoyé à partir d’un Smartphone Android avec GMX Mail.Le 18/01/2024, 17:47 Andrey Novikov @.***> a écrit:

BTW, are you a native french speaker? May be you can help localize Trekarta? —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

jpiebrig commented 6 months ago

Yes, I am french and even if I don't speak English very well, I can try to translate. But I don't know how to do.

jpiebrig commented 6 months ago

It seems that export is working now without problem with the last version. Great.

andreynovikov commented 6 months ago

I have created translation instructions: https://github.com/andreynovikov/trekarta/wiki/Translation There's also a link to online tool for translation.

jpiebrig commented 6 months ago

Hi Andrey, I have translated quite a lot of all the strings (with the help of a traductor, but not too much) but I don't succeed to translate app..values/plurals.xml (master) because I cannot save the translation. It tell me : Saisissez tous les pluriels afin de poursuivre (put all the plurals before going on). I don't know what to do. But I think that with that I have trans lated you can make a try.

jpiebrig commented 6 months ago

Hi Andrew. I have done all the translation with Transifex and I think it is not too bad :) ! You can try the french version now and I will check. I succeed to find how to do with app..values/plurals.xml. If something is missing ask me.

andreynovikov commented 6 months ago

Thank you! I'll close this issue, you may monitor progress here: https://github.com/andreynovikov/trekarta/pull/232