Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
cordova-imagePicker
===================

Cordova Plugin For Multiple Image Selection - implemented for iOS and Android 4.0 and above.
Forked from: [wymsee/cordova-imagePicker](https://github.com/wymsee/cordova-imagePicker)

Cordova Plugin For Multiple Image Selection - implemented for iOS and Android 3.0 and above.

## Installing the plugin

The plugin conforms to the Cordova plugin specification, it can be installed
using the Cordova / Phonegap command line interface.

phonegap plugin add cordova-plugin-image-picker
phonegap plugin add https://github.com/antonyalkmim/cordova-imagePicker

cordova plugin add cordova-plugin-image-picker
cordova plugin add https://github.com/antonyalkmim/cordova-imagePicker


## Using the plugin
Expand Down Expand Up @@ -58,11 +60,12 @@ window.imagePicker.getPictures(
// will be at most 800 pixels wide and 800 pixels tall. If the width is
// 800 and height 0 the image will be 800 pixels wide if the source
// is at least that wide.
width: int,
// only iOS => check Android issues below
width: int,
height: int,

// quality of resized image, defaults to 100
quality: int (0-100)
quality: int (0-100) //only iOS => check Android issues below
};

### iOS 10 issues
Expand All @@ -76,10 +79,13 @@ Example:
`cordova plugin add cordova-plugin-image-picker --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="your message"`

Empty string will be added as value if you dont pass the variable

### Note for Android Use

The plugin returns images that are stored in a temporary directory. These images will often not be deleted automatically though. The files should be moved or deleted after you get their filepaths in javascript.
### Android issues

There is a few things that must be implemented:
[ ] Matisse Filter to resize images witdh and height.
[ ] Matisse Filter to decrease images quality.


## Libraries used

Expand All @@ -89,17 +95,10 @@ For iOS this plugin uses the ELCImagePickerController, with slight modifications

https://github.com/B-Sides/ELCImagePickerController

#### MultiImageChooser

For Android this plugin uses MultiImageChooser, with modifications. MultiImageChooser uses the BSD 2-Clause License which can be found in the file BSD_LICENSE. Some code inside MultImageChooser is licensed under the Apache license which can be found in the file APACHE_LICENSE.

https://github.com/derosa/MultiImageChooser

#### FakeR

Code(FakeR) was also taken from the phonegap BarCodeScanner plugin. This code uses the MIT license.
#### Matisse

https://github.com/wildabeast/BarcodeScanner
For Android this plugin uses Matisse. Matisse uses the Apache License which can be found in the file APACHE_LICENSE.
https://github.com/zhihu/Matisse

## License

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-image-picker",
"version": "1.1.3",
"version": "1.1.4",
"description": "This plugin allows selection of multiple images from the camera roll / gallery in a phonegap app",
"cordova": {
"id": "cordova-plugin-image-picker",
Expand All @@ -21,7 +21,7 @@
"engines": [
{
"name": "cordova",
"version": ">=3.0.0"
"version": ">=6.2.3"
}
],
"author": "Wymsee",
Expand Down
64 changes: 23 additions & 41 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-image-picker"
version="1.1.1">
version="1.1.5">

<name>ImagePicker</name>

<description>
This plugin allows selection of multiple images from the camera roll / gallery in a phonegap app
</description>

<license>MIT</license>

<engines>
<engine name="cordova" version=">=3.0.0" />
</engines>
<engine name="cordova-android" version=">=6.0.0" />
</engines>

<js-module src="www/imagepicker.js" name="ImagePicker">
<clobbers target="plugins.imagePicker" />
Expand Down Expand Up @@ -62,53 +63,34 @@

<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">

<config-file target="res/xml/config.xml" parent="/*">
<feature name="ImagePicker">
<param name="android-package" value="com.synconset.ImagePicker"/>
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity android:label="@string/multi_app_name" android:name="com.synconset.MultiImageChooserActivity" android:theme="@android:style/Theme.Holo.Light">
<activity
android:label="ImagePicker"
android:name="com.synconset.ImgPickerActivity"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar">
</activity>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</config-file>

<source-file src="src/android/com/synconset/ImagePicker/ImagePicker.java" target-dir="src/com/synconset" />
<source-file src="src/android/com/synconset/ImagePicker/FakeR.java" target-dir="src/com/synconset" />

<source-file src="src/android/Library/src/ImageFetcher.java" target-dir="src/com/synconset"/>
<source-file src="src/android/Library/src/MultiImageChooserActivity.java" target-dir="src/com/synconset"/>

<source-file src="src/android/Library/res/anim/image_pop_in.xml" target-dir="res/anim"/>
<source-file src="src/android/Library/res/drawable/grid_background.xml" target-dir="res/drawable"/>
<source-file src="src/android/Library/res/drawable-hdpi/image_bg.9.png" target-dir="res/drawable-hdpi"/>
<source-file src="src/android/Library/res/drawable-hdpi/loading_icon.png" target-dir="res/drawable-hdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_discard_dark.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_discard_light.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_done_dark.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_done_light.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_launcher.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_discard_dark.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_discard_light.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_done_dark.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_done_light.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_launcher.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/layout/actionbar_custom_view_done_discard.xml" target-dir="res/layout"/>
<source-file src="src/android/Library/res/layout/actionbar_discard_button.xml" target-dir="res/layout"/>
<source-file src="src/android/Library/res/layout/actionbar_done_button.xml" target-dir="res/layout"/>
<source-file src="src/android/Library/res/layout/multiselectorgrid.xml" target-dir="res/layout"/>
<source-file src="src/android/Library/res/values/multiimagechooser_strings_en.xml" target-dir="res/values"/>
<source-file src="src/android/Library/res/values/themes.xml" target-dir="res/values"/>

<source-file src="src/android/Library/res/values-de/multiimagechooser_strings_de.xml" target-dir="res/values-de"/>
<source-file src="src/android/Library/res/values-es/multiimagechooser_strings_es.xml" target-dir="res/values-es"/>
<source-file src="src/android/Library/res/values-fr/multiimagechooser_strings_fr.xml" target-dir="res/values-fr"/>
<source-file src="src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml" target-dir="res/values-hu"/>
<source-file src="src/android/Library/res/values-ja/multiimagechooser_strings_ja.xml" target-dir="res/values-ja"/>
<source-file src="src/android/Library/res/values-ko/multiimagechooser_strings_ko.xml" target-dir="res/values-ko"/>

<framework src="com.android.support:support-v4:25.+" />
<framework src="com.android.support:appcompat-v7:25.+" />
<framework src="com.github.bumptech.glide:glide:3.7.0" />
<framework src="com.zhihu.android:matisse:0.5.0-alpha4" />

<source-file src="src/android/com/synconset/ImagePicker/ImagePicker.java" target-dir="src/com/synconset" />
<source-file src="src/android/com/synconset/ImagePicker/ImgPickerActivity.java" target-dir="src/com/synconset" />

</platform>
</plugin>
11 changes: 0 additions & 11 deletions src/android/Library/res/anim/image_pop_in.xml

This file was deleted.

Binary file removed src/android/Library/res/drawable-hdpi/icon.png
Binary file not shown.
Binary file removed src/android/Library/res/drawable-hdpi/image_bg.9.png
Binary file not shown.
Binary file not shown.
Binary file removed src/android/Library/res/drawable-ldpi/icon.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/android/Library/res/drawable-mdpi/icon.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 0 additions & 12 deletions src/android/Library/res/drawable/grid_background.xml

This file was deleted.

This file was deleted.

33 changes: 0 additions & 33 deletions src/android/Library/res/layout/actionbar_discard_button.xml

This file was deleted.

34 changes: 0 additions & 34 deletions src/android/Library/res/layout/actionbar_done_button.xml

This file was deleted.

23 changes: 0 additions & 23 deletions src/android/Library/res/layout/multiselectorgrid.xml

This file was deleted.

13 changes: 0 additions & 13 deletions src/android/Library/res/values-de/multiimagechooser_strings_de.xml

This file was deleted.

13 changes: 0 additions & 13 deletions src/android/Library/res/values-es/multiimagechooser_strings_es.xml

This file was deleted.

12 changes: 0 additions & 12 deletions src/android/Library/res/values-fr/multiimagechooser_strings_fr.xml

This file was deleted.

13 changes: 0 additions & 13 deletions src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml

This file was deleted.

Loading