* Check whether external storage is read only * * @returns {boolean} whether the external storage is read only
()
| 98 | * @returns {boolean} whether the external storage is read only |
| 99 | */ |
| 100 | function isExternalStorageReadOnly(): boolean { |
| 101 | const extStorageState = android.os.Environment.getExternalStorageState(); |
| 102 | if (android.os.Environment.MEDIA_MOUNTED_READ_ONLY === extStorageState) { |
| 103 | return true; |
| 104 | } |
| 105 | |
| 106 | return false; |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Checks whether external storage is available |