Interestingly, there is no way to do this in the Android SDK, and Stack Overflow has been misleading.
However, I found the VLC app on Github that does access the SD card, and I found code that lets me do it. I implemented those util functions.
We need to use this and have OpenMapKit store things in the SD card by default, and fall back on standard "external" storage as secondary.
https://github.com/mapsme/omim/blob/master/android/src/com/mapswithme/maps/settings/StorageUtils.java
Also, MAPS.ME has similar code, though it's a little less reusable:
https://github.com/mapsme/omim/blob/32f28f0aa4bc7a0564e002f84d292c6dd1849eaa/android/src/com/mapswithme/maps/settings/StoragePathManager.java
When implementing #19 we should do this.
Interestingly, there is no way to do this in the Android SDK, and Stack Overflow has been misleading.
However, I found the VLC app on Github that does access the SD card, and I found code that lets me do it. I implemented those util functions.
We need to use this and have OpenMapKit store things in the SD card by default, and fall back on standard "external" storage as secondary.
https://github.com/mapsme/omim/blob/master/android/src/com/mapswithme/maps/settings/StorageUtils.java
Also, MAPS.ME has similar code, though it's a little less reusable:
https://github.com/mapsme/omim/blob/32f28f0aa4bc7a0564e002f84d292c6dd1849eaa/android/src/com/mapswithme/maps/settings/StoragePathManager.java
When implementing #19 we should do this.