Skip to content

Commit 69b6f88

Browse files
committed
chore(storage, android)!: remove EXTERNAL_STORAGE permissions for Android 10/11 compat
On Android the following paths exist in app.utils.paths but are inaccessible without special permission: 'EXTERNAL_DIRECTORY', 'EXTERNAL_STORAGE_DIRECTORY', 'PICTURES_DIRECTORY', 'MOVIES_DIRECTORY', Please follow Google's migration guides for "Scoped Storage" to store your data in a future compatible way. https://developer.android.com/about/versions/11/privacy/storage#scoped-storage BREAKING CHANGE: if you need READ_EXTERNAL_STORAGE/WRITE_EXTERNAL_STORAGE permission add them in your app AndroidManifest.xml
1 parent cf7b157 commit 69b6f88

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/app/lib/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ export namespace Utils {
338338
* Traditionally this is an SD card, but it may also be implemented as built-in storage on a device.
339339
*
340340
* Returns null if no external storage directory found, e.g. removable media has been ejected by the user.
341+
* Requires special permission granted by Play Store review team on Android, is unlikely to be a valid path.
341342
*
342343
* ```js
343344
* firebase.utils.FilePath.EXTERNAL_STORAGE_DIRECTORY;
@@ -349,6 +350,7 @@ export namespace Utils {
349350

350351
/**
351352
* Returns an absolute path to a directory in which to place pictures that are available to the user.
353+
* Requires special permission granted by Play Store review team on Android, is unlikely to be a valid path.
352354
*
353355
* ```js
354356
* firebase.utils.FilePath.PICTURES_DIRECTORY;
@@ -358,6 +360,7 @@ export namespace Utils {
358360

359361
/**
360362
* Returns an absolute path to a directory in which to place movies that are available to the user.
363+
* Requires special permission granted by Play Store review team on Android, is unlikely to be a valid path.
361364
*
362365
* ```js
363366
* firebase.utils.FilePath.MOVIES_DIRECTORY;

packages/storage/android/src/main/AndroidManifest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,4 @@
44
<uses-permission android:name="android.permission.INTERNET" />
55
<uses-permission android:name="android.permission.WAKE_LOCK" />
66
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
7-
<!-- TODO(salakar) Not sure if this should be part of the package manifest or leave to users app manifest code? -->
8-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
9-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
107
</manifest>

0 commit comments

Comments
 (0)