All Projects → EinfachHans → cordova-plugin-advanced-imagepicker

EinfachHans / cordova-plugin-advanced-imagepicker

Licence: other
Cordova Plugin for an advanced (multiple) ImagePicker

Programming Languages

swift
15916 projects
java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to cordova-plugin-advanced-imagepicker

Cordova Plugin Mediapicker
cordova android ios mediaPicker support selection of multiple image and video gif ✨ cordova android 和 ios 图片视频选择cordova插件,支持多图 视频 gif,ui类似微信
Stars: ✭ 136 (+491.3%)
Mutual labels:  cordova, imagepicker
cordova-plugin-opentok
Cordova Plugin for OpenTok - add webrtc video to your iOS or Android App
Stars: ✭ 30 (+30.43%)
Mutual labels:  cordova
cordova-fonts
Cordova plugin for enumerating fonts on a mobile device
Stars: ✭ 14 (-39.13%)
Mutual labels:  cordova
cordova-plugin-1password
Plugin for adding 1Password App Extension into Cordova/PhoneGap Apps
Stars: ✭ 12 (-47.83%)
Mutual labels:  cordova
nativescript-imagepicker
Imagepicker plugin supporting both single and multiple selection.
Stars: ✭ 103 (+347.83%)
Mutual labels:  imagepicker
SwiftJSBridge
SwiftJSBridge is a handy JavaScript Bridge, written in Swift, support WKWebView and UIWebView
Stars: ✭ 29 (+26.09%)
Mutual labels:  cordova
ILIAS-Pegasus
An ILIAS Companion App
Stars: ✭ 19 (-17.39%)
Mutual labels:  cordova
docker-cordova
🗿 Docker image for Cordova (with Node.js & Android)
Stars: ✭ 72 (+213.04%)
Mutual labels:  cordova
Dianoia-app
Mobile (Ionic 3 - Angular 4) app about non-pharmaceutical activities and information for people with dementia.
Stars: ✭ 13 (-43.48%)
Mutual labels:  cordova
cordova-plugin-battery-status
Apache Cordova Plugin battery-status
Stars: ✭ 94 (+308.7%)
Mutual labels:  cordova
framework7-plugin-keypad
Keypad plugin extends Framework7 with additional custom keyboards
Stars: ✭ 72 (+213.04%)
Mutual labels:  cordova
RAImagePicker
📸 iMessage-like, Image Picker Controller Provides custom features.
Stars: ✭ 14 (-39.13%)
Mutual labels:  imagepicker
framework7-template-split-view
Deprecated! Framework7 split view starter app template
Stars: ✭ 19 (-17.39%)
Mutual labels:  cordova
SSImagePicker
Easy to use and configurable library to Pick an image from the Gallery or Capture an image using a Camera... 📸
Stars: ✭ 227 (+886.96%)
Mutual labels:  imagepicker
maji
Maji is a framework to build great hybrid mobile apps.
Stars: ✭ 18 (-21.74%)
Mutual labels:  cordova
capacitor-rate-app
Let users rate your app using native review app dialog for both Android and iOS.
Stars: ✭ 88 (+282.61%)
Mutual labels:  cordova
cordova-plugin-android-window-background
Simple Cordova plugin to set Android window background on start-up 🎨 🍭
Stars: ✭ 15 (-34.78%)
Mutual labels:  cordova
framework7-template-react
Deprecated! Framework7 React starter app template with hot-reload & css extraction
Stars: ✭ 105 (+356.52%)
Mutual labels:  cordova
JiaCordova
在Cordova及插件的基础上封装一些常用的功能,不断更新中
Stars: ✭ 35 (+52.17%)
Mutual labels:  cordova
ionic4-image-crop-upload
Ionic 4, Angular 7 and Cordova Crop and Upload Image
Stars: ✭ 16 (-30.43%)
Mutual labels:  cordova

Advanced ImagePicker Cordova Plugin

Maintenance npm version

This Cordova Plugin is for a better (multiple) ImagePicker with more options.

It currently uses Yummypets/YPImagePicker (Version 5.2.1) on iOS and ParkSangGwon/TedImagePicker (Default-Version 1.2.8) on Android.

This Plugin is in active development!

Donate

This and other Open-Source Cordova Plugins are developed in my free time. To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, if you're being paid to make the app, if you're asking for new features or priority bug fixes.

Table of Content

Install

Requirements

  • cordova >= 9.0.0
  • cordova-android >= 9.0.0

Android

Because the used Framework uses AndroidX and is developed in Kotlin, make sure to enable AndroidXEnabled and GradlePluginKotlinEnabled:

<preference name="AndroidXEnabled" value="true"/>
<preference name="GradlePluginKotlinEnabled" value="true"/>

iOS

This Plugin is developed in Swift and automaticaly adds the Plugin to Support Swift.

I developed it, testing with [email protected].

Environment Variables

Android

  • ANDROID_IMAGE_PICKER_VERSION - Version of gun0912.ted:tedimagepicker / default to 1.2.8

iOS

The iOS platform defines:

  • NSCameraUsageDescription: This app requires access to the camera to take pictures and videos.
  • NSPhotoLibraryUsageDescription: This app requires access to the photo library to select pictures and videos.
  • NSMicrophoneUsageDescription: This app requires access to the microphone to record videos.

You can easily change them, by configure your config.xml by:

<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
    <string>your text</string>
</edit-config>

Usage

The plugin is available via a global variable named window.AdvancedImagePicker. A TypeScript definition is included out of the Box. You can import it like this:

import AdvancedImagePicker from 'cordova-plugin-advanced-imagepicker';

Failure Callbacks

If an Error appeared this Plugin returns an Object in the failureCallback, that always has the following Structure:

{
  "code": 0,
  "message": "Some additional Info"
}

The code is one of the Error Codes and always present, while the message can be empty. This is mostly something like an Exception Message.

Error Codes

The following Error Codes can be fired by this Plugin:

  • UnsupportedAction
  • WrongJsonObject
  • PickerCanceled
  • UnknownError

They can be accessed over for Example window.AdvancedImagePicker.ErrorCodes.UnsupportedAction and are present in the TypeScript definition too of course.

Api

The list of available methods for this plugin is described below.

All platforms

present

Open the ImagePicker

Parameters:

  • options (object) - a JSON-Object containing the following Elements (all optional):
    • mediaType (string) default: "IMAGE"
    • showCameraTile (boolean) default: true
    • startOnScreen (string) default: "LIBRARY"
    • scrollIndicatorDateFormat (string) Android only, default: "YYYY.MM"
    • showTitle (boolean) Android only, default: true
    • title (string) Android only, default: "Select Image"
    • zoomIndicator (boolean) Android only, default: true
    • min (number) default: 0 (android), 1 (iOS)
    • minCountMessage (string) Android only, default: "You need to select a minimum of ... files"
    • max (number) default: 0 (android), 1 (iOS)
    • maxCountMessage (string) default: "You need to select a minimum of ... files"
    • buttonText (string)
    • asDropdown (boolean) default: false
    • asBase64 (boolean) default: false
    • asJpeg (boolean) default: false
    • videoCompression (string) (Available Options) default: AVAssetExportPresetHighestQuality
    • recordingTimeLimit (number) default: 60.0 IOS only
    • libraryTimeLimit (number) default: 60.0 IOS only
    • minimumTimeLimit (number) default: 3.0 IOS only
window.AdvancedImagePicker.present({
  // config here
}, function(success) {
  console.log(success);
}, function (error) {
  console.error(error);
});

SuccessType:

This Methode returns an Array of Objects with the following fields:

  • isBase64 (boolean) - is file base64 encoded
  • type ('image' | 'video') - type of selected file
  • src (string) - Result as file-uri or base64 encoded string

iOS

cleanup

Cleans the files that were stored in the tmp file directory

window.AdvancedImagePicker.cleanup(function() {
  console.log('success');
}, function (error) {
  console.error(error);
});

Quirks

Android

  • Currently, the Android Library is not able to select Images and Videos at the same Time. See reported Issue here.

Changelog

The full Changelog is available here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].