Socket
Socket
Sign inDemoInstall

cordova-plugin-pix

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cordova-plugin-pix

Cordova Plugin for Pix Image Picker


Version published
Weekly downloads
4
Maintainers
1
Install size
275 kB
Created
Weekly downloads
 

Readme

Source

A Cordova Plugin for Pix Image Picker

This plugin is a port of Pix (WhatsApp Style Image Picker) for using with Cordova.

Demo

Clone the sample repository

cdv-pix-screenshot

cordova.plugins.Pix.open(
    {
        success: function(response){},
        error: function(e){},
        quality: 50       
    }
);

Installation

$ cordova plugin add cordova-plugin-pix

Requirements

The following platforms and versions are supported by the latest release:

  • Android 4.4+
  • Cordova CLI 7.0 or higher

Pix.open(callbackContext)

Opens Pix Image Picker and get selected files back as an object.

Supported Platforms

  • Android 4.4+

Quick Examples

Open Pick Imager Picker and set a callback for success or fail events.

cordova.plugins.Pix.open(
    { 
        success: function(response) {
            console.log(response);
        },
        error: function(e) {
            console.error(e);
        },
        quality: 50
    }
);

Format of the response:

{
    "status": -1,
    "message": "RESULT_OK",
    "data": [
        {
            "file": "/storage/emulated/0/DCIM/Camera/IMG_20190415_182649.jpg",
            "base64": "/9j/4AAQSkZJRgABAQA...",
            "type": "image/jpeg",
            "prefix": "data:image/jpeg;charset=utf-8;base64,"
        }, 
        {
            "file": "/storage/emulated/0/DCIM/Camera/IMG_20190415_182644.jpg",
            "base64": "/9j/4AAQSkZJRgABAQA...",
            "type": "image/jpeg",
            "prefix": "data:image/jpeg;charset=utf-8;base64,"
        }
    ]
}


Keywords

FAQs

Last updated on 27 Jun 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc