Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nstudio/nativescript-rad-imagepicker


https://github.com/nstudio/nativescript-rad-imagepicker

Last synced: 5 days ago
JSON representation

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) :)

## License

Apache License Version 2.0, January 2004