Under Android, I need to save a KML to a location accessible by the Google Earth app, so I can "Open with Earth".
RNFS.ExternalDirectoryPath is writable on Android but not accessible by other apps:
/storage/emulated/0/Android/data/com.ditchwitch.fieldplanner/files'
The Download folder is writable on Android and accessible by other apps:
/storage/emulated/0/Download
A hard-coded to '/storage/emulated/0/Download' will break on other devices with no SD card or perhaps multiple
Would an API to get environment variables be too out-of-scope?
The C++ cross-platform library Qt had QStandardPaths constants are usable across Android, iOS, Linux, or Windows.
Use Case:
Under Android, I need to save a KML to a location accessible by the Google Earth app, so I can "Open with Earth".
RNFS.ExternalDirectoryPath is writable on Android but not accessible by other apps:
/storage/emulated/0/Android/data/com.ditchwitch.fieldplanner/files'
The Download folder is writable on Android and accessible by other apps:
/storage/emulated/0/Download
A hard-coded to '/storage/emulated/0/Download' will break on other devices with no SD card or perhaps multiple
Would an API to get environment variables be too out-of-scope?
The C++ cross-platform library Qt had QStandardPaths constants are usable across Android, iOS, Linux, or Windows.
http://doc.qt.io/qt-5/qstandardpaths.html
Here is what they resolve to an Android and an iOS device: