Skip to content

Commit 7349403

Browse files
authored
Merge pull request #45 from pnthach95/update-results
Fix bugs on Android
2 parents 63a49f4 + 45e7215 commit 7349403

File tree

159 files changed

+31941
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+31941
-25
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Whitelist com.luck.picture.lib package
2+
#
3+
!picture_library/src/com/luck/picture/lib/
4+
15
# OSX
26
#
37
.DS_Store
@@ -56,4 +60,4 @@ android/keystores/debug.keystore
5660
.expo/*
5761

5862
# generated by bob
59-
lib/
63+
lib/*

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,30 @@ const response = await MultipleImagePicker.openPicker(options);
128128
| maximumMessageTitle | string | Notification | iOS | The title of the alert when the user chooses to exceed the specified number of pictures |
129129
| messageTitleButton | string | Notification | iOS | The title of button in the alert when the user chooses to exceed the specified number of pictures |
130130
| tapHereToChange | string | Tap here to change | iOS | The sub-title in navigation bar (under albums's name in iOS) |
131-
| maximumMessage | string | You have selected the maximum number of media allowed | Both | The description of the alert when the user chooses to exceed the specified number of pictures |
132-
| maximumVideoMessage | string | You have selected the maximum number of media allowed | Both | The description of the alert when the user chooses to exceed the specified number of videos |
131+
| maximumMessage | string | You have selected the maximum number of media allowed | Both | The description of the alert when the user chooses to exceed the specified number of pictures |
132+
| maximumVideoMessage | string | You have selected the maximum number of media allowed | Both | The description of the alert when the user chooses to exceed the specified number of videos |
133133

134134
#### selectedAssets (Important)
135135

136136
Get an Array value only. If you want React Native Multiple Image Picker to re-select previously selected images / videos, you need to add “selectedAssets” in [options](#Options). Perhaps I say a little bit confusing. See [Example](https://github.com/baronha/react-native-multiple-image-picker/tree/main/example) for more details.
137137

138138
## Response Object
139139

140-
| Property | Type | Platform | Description |
141-
| --------------- | :----: | :------: | :----------------------------------------------------------------------- |
142-
| path | string | Both | Selected media's path |
143-
| filename | string | Both | Selected media's filename |
144-
| localIdentifier | string | Both | Selected media's local identifier |
145-
| width | number | Both | Selected photo/video width |
146-
| height | number | Both | Selected photo/video height |
147-
| mime | string | Both | Selected photo/video MIME type (image/jpeg, image/png, video/mp4 etc...) |
148-
| type | string | Both | Selected image type (image or video) |
149-
| size | number | Both | Selected photo/video size in bytes |
150-
| duration | number | Both | duration of the video (0 for images) |
151-
152-
| thumbnail | string | Both | Appears only in video format and you must have set isExportThumbnail = true. See [options](#Options) |
153-
| creationDate | string | iOS | UNIX timestamp when image was created |
140+
| Property | Type | Platform | Description |
141+
| ---------------- | :----: | :------: | :--------------------------------------------------------------------------------------------------- |
142+
| path | string | Both | Selected media's path |
143+
| filename | string | Both | Selected media's filename |
144+
| localIdentifier | string | Both | Selected media's local identifier |
145+
| width | number | Both | Selected photo/video width |
146+
| height | number | Both | Selected photo/video height |
147+
| mime | string | Both | Selected photo/video MIME type (image/jpeg, image/png, video/mp4 etc...) |
148+
| type | string | Both | Selected image type (image or video) |
149+
| size | number | Both | Selected photo/video size in bytes |
150+
| duration | number | Both | duration of the video (0 for images) |
151+
| thumbnail | string | Both | Appears only in video format and you must have set isExportThumbnail = true. See [options](#Options) |
152+
| realPath | string | Android | Real path to file |
153+
| parentFolderName | string | Android | Parent folder name of file |
154+
| creationDate | string | iOS | UNIX timestamp when image was created |
154155

155156
## To Do
156157

android/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44

55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88
}
99

1010
dependencies {
@@ -29,7 +29,7 @@ android {
2929
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
3030
buildToolsVersion getExtOrDefault('buildToolsVersion')
3131
defaultConfig {
32-
minSdkVersion 16
32+
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
3333
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
3434
versionCode 1
3535
versionName "1.0"
@@ -52,7 +52,6 @@ android {
5252

5353
repositories {
5454
mavenCentral()
55-
jcenter()
5655
google()
5756

5857
def found = false

android/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ MultipleImagePicker_kotlinVersion=1.3.50
22
MultipleImagePicker_compileSdkVersion=29
33
MultipleImagePicker_buildToolsVersion=29.0.2
44
MultipleImagePicker_targetSdkVersion=29
5+
MultipleImagePicker_minSdkVersion=21

android/src/main/java/com/reactnativemultipleimagepicker/MultipleImagePickerModule.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ class MultipleImagePickerModule(reactContext: ReactApplicationContext) :
6969
.isPreviewVideo(isPreview)
7070
.isCamera(isCamera)
7171
.isReturnEmpty(true)
72-
.maximumMessage(maximumMessage)
73-
.maximumVideoMessage(maximumVideoMessage)
7472
.selectionMode(if (singleSelectedMode) PictureConfig.SINGLE else PictureConfig.MULTIPLE)
7573
.forResult(object : OnResultCallbackListener<LocalMedia?> {
7674
override fun onResult(result: MutableList<LocalMedia?>?) {
@@ -212,7 +210,7 @@ class MultipleImagePickerModule(reactContext: ReactApplicationContext) :
212210
val type: String = if (item.mimeType.startsWith("video/")) "video" else "image"
213211
media.putString("path", item.path)
214212
media.putString("realPath", item.realPath)
215-
media.putString("fileName", item.fileName)
213+
media.putString("filename", item.fileName)
216214
media.putInt("width", item.width)
217215
media.putInt("height", item.height)
218216
media.putString("mime", item.mimeType)
@@ -284,4 +282,3 @@ class MultipleImagePickerModule(reactContext: ReactApplicationContext) :
284282
}
285283

286284
}
287-

0 commit comments

Comments
 (0)