Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README about Android SDK version #1887

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 16 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ImagePicker.openPicker({
**Android: The prop 'cropping' has been known to cause videos not to be displayed in the gallery on Android. Please do not set cropping to true when selecting videos.**


### Select from camera
### Select from camera

#### Image

Expand Down Expand Up @@ -212,15 +212,25 @@ In Xcode open Info.plist and add string key `NSPhotoLibraryUsageDescription` wit

- Open your Xcode project
- Go to your project settings by opening the project name on the Navigation (left side)
- Select your project in the project list
- Select your project in the project list
- Should be into the Info tab and add in Localizations the language your app was missing throughout the +
- Rebuild and you should now have your app camera and gallery with the classic ios text in the language you added.

### Android

- **VERY IMPORTANT** Add the following to your `build.gradle`'s repositories section. (android/build.gradle)
- **VERY IMPORTANT** Add the following to your `build.gradle`'s repositories section and change Android SDK version to 33. (android/build.gradle)

```gradle
buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
...
}
}

allprojects {
repositories {
mavenLocal()
Expand Down Expand Up @@ -251,23 +261,6 @@ android {
}
```

- Use Android SDK >= 26 (android/app/build.gradle)

```gradle
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
...

defaultConfig {
...
targetSdkVersion 27
...
}
...
}
```

- Minimum Gradle version if you are using react-native-image-crop-picker >= 0.35.0

```
Expand All @@ -280,6 +273,9 @@ android {

Reference for more details https://github.com/ivpusic/react-native-image-crop-picker/issues/1406

- If you use SDK version >= 33, add following to `app/src/main/AndroidManifest.xml`
- `<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need android.permission.READ_EXTERNAL_STORAGE ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the docs:

Starting in API level 33, this permission has no effect

So, no, we don't need it


- [Optional] If you want to use camera picker in your project, add following to `app/src/main/AndroidManifest.xml`
- `<uses-permission android:name="android.permission.CAMERA"/>`

Expand Down