[Android] GIFs will not be displayed in Android ---v2.2.2
"@baronha/react-native-multiple-image-picker": "^2.2.2", "react-native-nitro-modules": "^0.26.2", "react": "18.3.1", "react-native": "0.77.1",
try {
const response = await openPicker({
maxSelect: 1,
backgroundDark: '#513E62',
numberOfColumn: 4,
mediaType: 'all',
selectBoxStyle: 'number',
selectMode: 'multiple',
language: 'zh-Hans',
theme: 'dark',
isHiddenOriginalButton: false,
primaryColor: Colors.primaryColor,
crop: false,
});
console.log('[response]', response);
} catch (e) {
console.log('[e]', e);
// catch error for multiple image picker
}
npx react-native info info Fetching system and libraries information... System: OS: macOS 14.5 CPU: (8) arm64 Apple M1 Memory: 110.13 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.20.3 path: ~/.nvm/versions/node/v18.20.3/bin/node Yarn: version: 1.22.22 path: ~/.nvm/versions/node/v18.20.3/bin/yarn npm: version: 10.7.0 path: ~/.nvm/versions/node/v18.20.3/bin/npm Watchman: version: 2025.03.10.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.16.2 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 24.2 - iOS 18.2 - macOS 15.2 - tvOS 18.2 - visionOS 2.2 - watchOS 11.2 Android SDK: API Levels: - "28" - "29" - "30" - "31" - "32" - "33" - "34" - "35" Build Tools: - 28.0.3 - 29.0.2 - 30.0.2 - 30.0.3 - 31.0.0 - 33.0.0 - 34.0.0 - 35.0.0 System Images: - android-34 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2024.3 AI-243.26053.27.2432.13536105 Xcode: version: 16.2/16C5032a path: /usr/bin/xcodebuild Languages: Java: version: 17.0.15 path: /usr/bin/javac Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": installed: 15.0.1 wanted: 15.0.1 react: installed: 18.3.1 wanted: 18.3.1 react-native: installed: 0.77.1 wanted: 0.77.1 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: true iOS: hermesEnabled: Not found newArchEnabled: false
I find in this, node_modules/@baronha/react-native-multiple-image-picker/android/src/main/java/com/margelo/nitro/multipleimagepicker/MultipleImagePickerImp.kt
val showGif = config.mediaType != MediaType.VIDEO // add this to fix
PictureSelector.create(activity)
.openGallery(chooseMode)
.setImageEngine(imageEngine)
.setSelectedData(dataList)
.setSelectorUIStyle(style)
.isGif(showGif) // add this to fix
.apply