Skip to content

Commit 5c16879

Browse files
authored
fix: warn users about new google policy and to replace cameraroll with image-picker (#2916)
1 parent 9cf1bab commit 5c16879

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

package/expo-package/src/optionalDependencies/getPhotos.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ type ReturnType = {
2727
export const getPhotos = MediaLibrary
2828
? async ({ after, first }): Promise<ReturnType> => {
2929
try {
30+
if (Platform.OS === 'android') {
31+
console.warn(
32+
'expo-media-library can be removed in favour of new google policy(https://support.google.com/googleplay/android-developer/answer/14115180?hl=en) if you do not have gallery as your core feature of the app.\nYou can replace it with expo-image-picker and uninstall it. Guide - https://getstream.io/chat/docs/sdk/react-native/guides/native-image-picker/.',
33+
);
34+
}
3035
// NOTE:
3136
// should always check first before requesting permission
3237
// because always requesting permission will cause

package/native-package/src/optionalDependencies/getPhotos.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ export const getPhotos = CameraRollDependency
7373
? async ({ after, first }): Promise<ReturnType> => {
7474
try {
7575
if (Platform.OS === 'android') {
76+
console.warn(
77+
'@react-native-camera-roll/camera-roll can be removed in favour of new google policy(https://support.google.com/googleplay/android-developer/answer/14115180?hl=en) if you do not have gallery as your core feature of the app.\nYou can replace it with react-native-image-picker and uninstall it. Guide - https://getstream.io/chat/docs/sdk/react-native/guides/native-image-picker/.',
78+
);
7679
const granted = await verifyAndroidPermissions();
7780
if (!granted) {
7881
throw new Error('getPhotos Error');

0 commit comments

Comments
 (0)