Skip to content

Commit

Permalink
Add docs for Android single mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnjsstong committed Aug 16, 2016
1 parent 84c8e34 commit 955704d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Currently, [RxGalleryFinal](https://github.com/FinalTeam/RxGalleryFinal) is stil
```javascript
import MultipleImagePicker from 'react-native-multiple-image-picker';
const options = {
maxImagesCount: 9, // Max number of images user can select
selectedPaths: [
Expand All @@ -51,5 +52,16 @@ const options = {
'/Users/tshen/Library/Developer/CoreSimulator/Devices/8C416B45-F555-4A63-A1B0-09E61109F0A0/data/Containers/Data/Application/A1790255-CDE8-486C-A6BA-1693BA2AA87B/Documents/BB6ADD56-09E7-402C-BF0E-AD79400D3889-7539-000007B93A6B5733/3.jpg'
] // Currently selected paths, must be from result of previous calls
};
MultipleImagePicker.launchImageGallery(options);
MultipleImagePicker.launchImageGallery(options).then((newSelectedPaths) => {
// newSelectedPaths will be an Array of String, like [ '/path/1', '/path/2' ], and may be used for `selectedPaths` on the next invocation
});
// single mode - Android only
const singleOptions = {
single: true
};
MultipleImagePicker.launchImageGallery(singleOptions).then((path) => {
// path will be a String, like 'file:///storage/sdcard/Download/IMG_0617.JPG'
});
```

0 comments on commit 955704d

Please sign in to comment.