Skip to content

uk.co.kaarbontech.ktexternal-sd

https://github.com/kaarbontech/drains/tree/devel/tools/app-builder/app-template/plugins/uk.co.kaarbontech.ktexternal-sd

What

A plugin for handling Android storage details.

Why

  • Handling maps stored on SD card.
  • Allow all access for the app for reading the root of the SD card. Needed from Android 13> scoped storage removed the MANAGE_EXTERNAL_STORAGE permission.

How

cordova.plugin.ktExternalSd.getDetails()

https://github.com/kaarbontech/drains/blob/devel/shared/client/common/src/Drains/OSVersion/OSVersion.js#L15-L23

cordova.plugin.ktExternalSd.checkIfAllFilesAccessGranted(successCallback,errorCallback)

Check if all files access is granted to app in settings for Android

cordova.plugin.ktExternalSd.getManageStorageIntent(successCallback,errorCallback)

Launches the Manage External Storage intent which will take the user to the android app settings page to allow them to grant all files access for the app.