Should work, this does:
Displays the raw xml content (no style)
Should work, this does:
Displays the raw xml content (no style)
I had already tried this solution
moving to new topic....
It looks like you are using a file picker extension... which one? Any link? That extension probably is not able to pick a file from the assets...
Also in your other thread you mentioned
But what I want to send a new file to the webviewer that doesn't exist in assets before compiling
Which means reading the file from the assets will not help very much anyway...
Taifun
I am using :
I am using:
Which means reading the file from the assets will not help very much anyway...
That's right, what I'm trying to do is to load a .gpx file that is in a directory on the mobile phone.
- In which directory?
In any directory or by creating a specific one. In companion it works from any directory.
- Where does the GPX file come from?
- Was it created by the app itself?
any file imported in gpx format, not created by the app
- Read this:
Apparently I can read it, since it works in companion.
Which Android version are you testing on?
"In companion it works from any directory."
No, not on Android 11+ (at least not with non-media files).
My Android version is: 10 QKQ1.190910.002
Yes, on Android 10 you have full access to the external storage, because AI2 decided to declare requestLegacyExternalStorage = true
in the Manifest. On all Android version > 10 you have to live with "Scoped Storage".
So, what would be the solution??
If the GPX (non-media) file is not created by the app you must use SAF to access (read) it.
(Otherwise you have to declare, request & grant
MANAGE_EXTERNAL_STORAGE
permission. Search the forum for more details.)
Where does the GPX file come from?
Usually imported from wikilock .... or any other database.
Other times it is prepared in GIS applications.
There are a lot of sources where to find and download gpx files.
It doesn't matter where GPX files generally come from, but where do those come from that you want to read with your app. Are these generated by / during use of your app?
Previous discussions of gpx files on this community. might be of interest if you cannot find a solution using javascript.
I read the gpx format and use a java script to convert them to geojson and send them to webviever for viewing.
The original .gpx can be placed in any accessible directory.
I suppose that you know them but I attach a .gpx file
Etapa1.txt (17.2 KB)
Change the extension to gpx, I can't upload files with the .gpx extension.