refering to Taifun’s tutorial Picking files from the SD Card, how can I pick a gpx file? I tried file/gpx, application/gpx, but it does not work.
according to this
you can try application/gpx+xml
application/gpx+xml does not work. I tried application/octet-stream and it works.
I found it on Google: mime type of gpx file
(before your answer I didnt know what to ask)
Thx for your promt reply
I have another question. Now I can pick a gpx file to draw it in map. If I store gpx files in root directory it is easy to pick them. Pls check image1 block:
but there appear error “file cannot be found” due to path to the gpx file which is in my case
I can solve that with following blocks:
With those blocks I can easily draw all gpx file with map component. But I am affraid that is solution only for my phone. I guess in other phone brands or android versions this path can be differently writen? Also, that is not solution in case user create subfolder and store gpx files there.
Therefore, is there any way I can pick a gpx file and somehow parse its name from its path no matter how long/short that path is, and no matter where gpx file is stored?
Yes, use Taifun’s File Extension to get the correct path - there is a convert content uri block in there.
thx for your hint. I found it much more convenient to use list picker combined with Taifun’s File Extension instead of ActivityStarter as above.