npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-flyff-imagepicker

v2.0.0

Published

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

Downloads

8

Readme

cordova 图片多选插件, 也兼容 capacitor; 基于cordova-plugin-telerik-imagepicker插件修改; 使用请参考原文;

如果使用ionic,安装方式:

npm i @ionic-native/image-picker
ionic cordova plugin add cordova-plugin-flyff-imagepicker

版本限制

1.x:

<!-- cordova-android ">=5 <9" -->
<engine name="cordova-android" version="5.0.0 - 8" />

2.x:

<!-- cordova-android ">=9 <12" -->
<engine name="cordova-android" version="9.0.0 - 11" />

注意事项

cordova需要在config.xml添加权限配置

<!-- android -->
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
    <application android:requestLegacyExternalStorage="true" />
</edit-config>
<!-- ios -->
<config-file parent="NSCameraUsageDescription" target="*-Info.plist">
    <string>需要您的同意才能在使用签收功能时选择照片上传,如果不同意会导致无法使用照片证明收到货。</string>
</config-file>
<config-file parent="NSPhotoLibraryUsageDescription" target="*-Info.plist">
    <string>需要您的同意才能在使用签收功能时选择照片上传,如果不同意会导致无法使用照片证明收到货。</string>
</config-file>

capacitor需要在原生项目手动配置;

1.x调整

iOS

缩略图主线程渲染

使用GCD库调用主线程进行渲染; 涉及方法:

// GMGridViewController.m
- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath;

图片选择未授权的情况

调整为,等授权完再重新执行一次方法; 涉及方法:

// SOSPicker.m
- (void) requestReadPermission:(CDVInvokedUrlCommand *)command;

本地化增加中文

添加了zh-Hans.lproj文件夹

Android

本地化增加中文

添加了values-zh文件文件夹

2.x调整

Android

支持AndroidX

MultiImageChooserActivity.java改动:

# android.support.v7 => androidx.appcompat
- import android.support.v7.app.ActionBar;
- import android.support.v7.app.AppCompatActivity;
+ import androidx.appcompat.app.ActionBar;
+ import androidx.appcompat.app.AppCompatActivity;
# ImageView不支持了
- private class SquareImageView extends ImageView
+ private class SquareImageView extends androidx.appcompat.widget.AppCompatImageView

ImagePicker.java改动:

# android.support.v4 => androidx.core
- import android.support.v4.app.ActivityCompat
- import android.support.v4.content.ContextCompat;
+ import androidx.core.app.ActivityCompat;
+ import androidx.core.content.ContextCompat;

相册权限

请求权限的方式改成使用cordova提供的接口

修改plugin.xml

注释代码:

<!-- 添加安卓时出现错误:`Cannot read property 'find' of null`; -->
<resource-file src="src/android/Library/res/values/themes.xml" target="res/values/themes.xml"/>
<!-- 合并出错 -->
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
    <application android:requestLegacyExternalStorage="true" />
</edit-config>