Hi and good evening,
my Xamarin.Forms App (tested on Android 10) must work offline, flexible and with vector data. My idea was to store the data in shape files or geojson on the external storage on the mobile device. The selection should be done with filepicker from xamarin.essentials.
var da_file = await FilePicker.PickAsync();
String file_path = da_file.FullPath;
or Result: /storage/emulated/0/Android/data/com.companyname.gasdetect/cache/2203693cc04e0be7f4f024d5f9499e13/66029f1ad161475b8474bc606a7003c8/railway.geojson
ShapefileFeatureTable myShapefile = await ShapefileFeatureTable.OpenAsync(file_path);
I get the result: File not found: Invalid path or missing shapefile data.
The files are there, the geojson file is loaded. I tested with several sets of shp files.
What is going here? or Do you have a better idea to solve the offline data challenge?
Thank you in advance.
Did you give the application permission to read that location?
yes I did. I can read GEOJSON from same folder. Is it license problem?