You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/imagepicker.md
+25-23Lines changed: 25 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,12 @@ Install the plugin by running the following command in the root directory of you
39
39
npm install @nativescript/imagepicker
40
40
```
41
41
42
+
**Note: Version 3.0 contains breaking changes:**
43
+
44
+
- authorize() now returns a `Promise<AuthorizationResult>` for both android and ios.
45
+
- In the returned result from `present()` each `result[i].thumbnail` is now an `ImageSource`.
46
+
-`result[i].duration` is now typed correctly as a `number`.
47
+
42
48
**Note: Version 2.0 contains breaking changes. In order supply more information about your selection, the ImageSource asset is nested in the response so you'll need to update your code to use `result.asset` instead of `result` as your src for your Images.**
43
49
44
50
## Android required permissions
@@ -114,29 +120,25 @@ let imagePickerObj: ImagePicker = imagePickerPlugin.create({
|`constructor(options: Options)`|`ImagePicker`| Instanciates the ImagePicker class with the optional `options` parameter. See [Options](#options)|
158
-
|`authorize()`|`Promise<void>`| Requests the required permissions. Call it before calling `present()`. In case of a failed authorization, consider notifying the user for degraded functionality. |
159
-
|`present()`|`Promise<ImageAsset[]>`| Presents the image picker UI. |
160
-
|`create(options: Options, hostView: View)`|`ImagePicker`| Creates an instance of the ImagePicker class. The `hostView` parameter can be set to the view that hosts the image picker. Intended to be used when opening the picker from a modal page. |
|`constructor(options: Options)`|`ImagePicker`| Instanciates the ImagePicker class with the optional `options` parameter. See [Options](#options)|
160
+
|`authorize()`|`Promise<AuthorizationResult>`| Requests the required permissions. Call it before calling `present()`. In case of a failed authorization, consider notifying the user for degraded functionality. The returned `AuthorizationResult` will have it's `authorized` property set to `true` if permission has been granted.|
161
+
|`present()`|`Promise<ImagePickerSelection[]>`| Presents the image picker UI.|
162
+
|`create(options: Options, hostView: View)`|`ImagePicker`| Creates an instance of the ImagePicker class. The `hostView` parameter can be set to the view that hosts the image picker. Intended to be used when opening the picker from a modal page.|
0 commit comments