Giter VIP home page Giter VIP logo

Comments (4)

melvinversluijs avatar melvinversluijs commented on May 26, 2024 1

@SonnyCampbell,
Unfortunately our plugin does not work with Cordova Adnroid 7.0.0, you will have to downgrade to Cordova Android 6.3.0 with cordova platform add [email protected].

The way JNI files are being loaded into Android has been changed as of version 7.0.0, which renders our plugin useless since it depends on the OpenALPR JNI files.

We do not have any plans to fix this any time soon. So if you fix this yourself in the meantime feel free to create a new Pull Request.

Kind regards,
Melvin

from cordova-plugin-openalpr.

iMicknl avatar iMicknl commented on May 26, 2024

Are you sure this is an error related to our plugin? I can't find any error which relate to a plugin file.

from cordova-plugin-openalpr.

jor3l avatar jor3l commented on May 26, 2024

Edit: Forgot to mention, this was on version 1 ->

I was able to get this plugin working with android 7+ by using multiple plugins, the idea is to get the image, use a plugin to save it from base64 to file, here the app will request file permisisons, and you can then pass the file path to openalpr plugin.

To save the image from base64 I'm using: cordova plugin add https://github.com/tate-u/Canvas2ImagePlugin.git and modify the Canvas2ImagePlugin.js with this:

module.exports = {

    saveImageDataToLibrary: function (success, failure, canvas) {
        var defaults = { canvas: null, fileName: "IMG_" + new Date().getTime(), album: 'Apps', success: function () { }, failure: function () { } };
        var settings = Object.assign({}, defaults);
        
        var imageData = canvas.replace(/data:image\/jpeg;base64,/, '');
        return cordova.exec(success, failure, "Canvas2ImagePlugin", "saveImageDataToLibrary", [imageData, settings.fileName, settings.album]);
    }
};

Then use it like this:

window.canvas2ImagePlugin.saveImageDataToLibrary(
    function(msg){
     cordova.plugins.OpenALPR.scan(msg) ...
    },
    function(error) {},
    base64ImageData
);

Hope this helps.

from cordova-plugin-openalpr.

matbeard avatar matbeard commented on May 26, 2024

Could you possibly give some indication of what's involved in making this plugin compatible with Android 7+?

Is it a case of altering the plugin.xml and placing files in different target folders etc. or is there far more to it than that?

Any advice is much appreciated.

from cordova-plugin-openalpr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.