1.1.0 • Published 2 years ago
cordova-plugin-scanbot-image-picker v1.1.0
Scanbot Image Picker for Cordova
Simple plugin that implements a very straight-forward native iOS & Android Image Picker, which features:
Multiple Images Selection
Customizable Parameters
Typescript definitions
Promisified API interface
Installation
cordova plugin add cordova-plugin-scanbot-image-picker
Usage
Import Module
import ScanbotImagePicker from 'cordova-plugin-scanbot-image-picker'
Pick Single Image
Opens the native single image picker, and returns the selected image file URI.
Example
const result = await ScanbotImagePicker.pickImage();
if (result.status == "OK") {
let image = result.imageFileUri;
}
Optional Parameters
export interface ScanbotImagePickerSingleConfiguration {
/**
* The quality of the images returned by the Image Picker, from 0 to 100 (default = 100)
*/
imageQuality?: number;
}
Result
export interface ScanbotImagePickerSingleResult {
status: "OK" | "CANCELED";
imageFileUri?: string;
}
Pick Multiple Images
Opens the multiple image picker, and returns the selected image files URIs.
Example
const result = await ScanbotImagePicker.pickImages();
if (result.status == "OK") {
let images = result.imageFilesUris;
}
Optional Parameters
export interface ScanbotImagePickerMultipleConfiguration {
/**
* Maximum selectable images. Default is 0 (unlimited).
*/
maxImages?: number;
/**
* The quality of the images returned by the Image Picker, from 0 to 100 (default = 100).
*/
imageQuality?: number;
}
Result
export interface ScanbotImagePickerMultipleResult {
status: "OK" | "CANCELED";
imageFilesUris: string[];
}
Contributing
Contributions in the form of issues, pull requests and suggestions are very welcome.
Disclaimer
This package is still in beta and should be used with that in mind.
License
1.1.0
2 years ago
1.1.0-beta3
2 years ago
1.1.0-beta1
2 years ago
1.1.0-beta2
2 years ago
1.0.0
3 years ago
1.0.0-alpha3
3 years ago
1.0.0-alpha4
3 years ago
1.0.0-beta2
3 years ago
1.0.0-beta1
3 years ago
1.0.0-alpha2
3 years ago
1.0.0-alpha1
3 years ago