Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nstudio/nativescript-rad-imagepicker
https://github.com/nstudio/nativescript-rad-imagepicker
Last synced: 5 days 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 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T15:01:43.000Z (over 3 years ago)
- Last Synced: 2024-10-02T08:00:04.043Z (about 1 month ago)
- Language: TypeScript
- Size: 17.2 MB
- Stars: 23
- Watchers: 7
- Forks: 4
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NativeScript Rad Imagepicker Plugin ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png)
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) :)
## LicenseApache License Version 2.0, January 2004