https://github.com/nstudio/nativescript-rad-imagepicker
https://github.com/nstudio/nativescript-rad-imagepicker
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/nstudio/nativescript-rad-imagepicker
- Owner: nstudio
- License: apache-2.0
- Created: 2018-06-27T17:48:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T15:01:43.000Z (almost 5 years ago)
- Last Synced: 2025-09-18T00:57:41.782Z (6 months ago)
- Language: TypeScript
- Size: 17.2 MB
- Stars: 23
- Watchers: 6
- Forks: 4
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NativeScript Rad Imagepicker Plugin  
NativeScript plugin for whatsapp style image picking.
This Plugin uses [PixImagePicker](https://github.com/akshay2211/PixImagePicker) for Android and [ImagePicker](https://github.com/hyperoslo/ImagePicker) for iOS
## Installation
```javascript
tns plugin add @nstudio/nativescript-rad-imagepicker
```
## Usage
```javascript
const RadImagepicker = require('@nstudio/nativescript-rad-imagepicker').RadImagepicker;
const PickerOptions = require('@nstudio/nativescript-rad-imagepicker').PickerOptions;
const radImagepicker = new RadImagepicker();
radImagepicker.pick(opts).then((selectedImages) => {
if (selectedImages) {
// Do something with selected images
// currently
// the image will be of type nativescript image source
// tns-core-modules/image-source
}
});
```
## API
Following picker options are available
```javascript
PickerOptions {
doneButtonTitle?: string; // only affects ios
noImagesTitle?: string; // only affects ios
allowVideoSelection?: boolean; // only affects ios
imageLimit?: number;
}
```
Picker api
```javascript
pick(options: PickerOptions): Promise>;
```
When the promise resolves, you will get array of imageSource
### Theming
#### Android
Add desired colors in `app/App_Resources/Android/src/main/res/values/colors.xml`
```xml
#272734
#075e54
#80075e54
```
### Permissions
### Android
Make sure these lines are in your Manifest.xml
```xml
```
### iOS
Add these to info.plist, you can add more descriptive message here
```xml
NSCameraUsageDescription
This app uses your camera
NSPhotoLibraryUsageDescription
This app uses your photo library
```
----
Made With ♥️ for {N} Community by [nStudio](https://nstudio.io)
Special Thanks to [Richard Smith](https://github.com/dicksmith) and [Osei Fortune](https://github.com/triniwiz) :)
## License
Apache License Version 2.0, January 2004