Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Scrub image_picker_android
  • Loading branch information
stuartmorgan-g committed Aug 19, 2025
commit e54e316b6c9effe8ea5c7b51ae5930abf9dc7f07
5 changes: 1 addition & 4 deletions packages/image_picker/image_picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and taking new pictures with the camera.

| | Android | iOS | Linux | macOS | Web | Windows |
|-------------|---------|---------|-------|--------|---------------------------------|-------------|
| **Support** | SDK 21+ | iOS 12+ | Any | 10.14+ | [See `image_picker_for_web`](https://pub.dev/packages/image_picker_for_web#limitations-on-the-web-platform) | Windows 10+ |
| **Support** | SDK 24+ | iOS 12+ | Any | 10.14+ | [See `image_picker_for_web`](https://pub.dev/packages/image_picker_for_web#limitations-on-the-web-platform) | Windows 10+ |

## Setup

Expand Down Expand Up @@ -38,9 +38,6 @@ _Privacy - Microphone Usage Description_ in the visual editor.

### Android

Starting with version **0.8.1** the Android implementation support to pick
(multiple) images on Android 4.3 or higher.

No configuration required - the plugin should work out of the box. It is however
highly recommended to prepare for Android killing the application when low on memory. How to prepare for this is discussed in the
[Handling MainActivity destruction on Android](#handling-mainactivity-destruction-on-android)
Expand Down
5 changes: 3 additions & 2 deletions packages/image_picker/image_picker_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 0.8.13+1

* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
* Updates minimum supported SDK version to Flutter 3.35.
* Removes obsolete code related to supporting SDK <24.

## 0.8.13

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
compileSdk = flutter.compileSdkVersion

defaultConfig {
minSdkVersion 21
minSdkVersion 24
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -988,14 +988,10 @@ private void finishWithError(String errorCode, String errorMessage) {
}

private void useFrontCamera(Intent intent) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
intent.putExtra(
"android.intent.extras.CAMERA_FACING", CameraCharacteristics.LENS_FACING_FRONT);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
intent.putExtra("android.intent.extra.USE_FRONT_CAMERA", true);
}
} else {
intent.putExtra("android.intent.extras.CAMERA_FACING", 1);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,16 @@ private static PackageInfo getPermissionsPackageInfoPreApi33(
}

/**
* Camera permission need request if it present in manifest, because for M or great for take Photo
* ar Video by intent need it permission, even if the camera permission is not used.
* Camera permission needs to be requested if it is present in the manifest, even if the camera
* permission is not used.
*
* <p>Camera permission may be used in another package, as example flutter_barcode_reader.
* https://github.com/flutter/flutter/issues/29837
*
* @return returns true, if need request camera permission, otherwise false
*/
static boolean needRequestCameraPermission(Context context) {
boolean greatOrEqualM = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
return greatOrEqualM && isPermissionPresentInManifest(context, Manifest.permission.CAMERA);
return isPermissionPresentInManifest(context, Manifest.permission.CAMERA);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Demonstrates how to use the image_picker plugin.
publish_to: none

environment:
sdk: ^3.7.0
flutter: ">=3.29.0"
sdk: ^3.9.0
flutter: ">=3.35.0"

dependencies:
flutter:
Expand Down
6 changes: 3 additions & 3 deletions packages/image_picker/image_picker_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: image_picker_android
description: Android implementation of the image_picker plugin.
repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
version: 0.8.13
version: 0.8.13+1

environment:
sdk: ^3.7.0
flutter: ">=3.29.0"
sdk: ^3.9.0
flutter: ">=3.35.0"

flutter:
plugin:
Expand Down