disusered / cordova-safe

File encryption for Cordova.
MIT License
35 stars 22 forks source link

Unable to get Success or failure callback for cordova 5.0 & android version 5.1.1 #12

Open pallaviMN opened 8 years ago

asethwright commented 7 years ago

Hi, thanks a lot for working on this plugin. Just wondering if there was any update to this bug?

pallaviMN commented 7 years ago

no i am not using it

SvenSiwek commented 7 years ago

I found a solution for me. I dont need the fileinfo in the callback. In file www/disusered.safe.js I have comment out the original exec() and replaced with a shorter one.

` encrypt: function(path, password, success, error) { var encryptSuccess, encryptError; if (!path || arguments.length === 0) return;

// encryptSuccess = onSuccess.bind(null, success); // encryptError = onError.bind(null, error);

// exec(encryptSuccess, encryptError, 'Safe', 'encrypt', [path, password]); exec(success, error, 'Safe', 'encrypt', [path, password]); },

/**

// decryptSuccess = onSuccess.bind(null, success); // decryptError = onError.bind(null, error);

// exec(decryptSuccess, decryptError, 'Safe', 'decrypt', [path, password]); exec(success, error, 'Safe', 'decrypt', [path, password]); }

};`

If you are using cordova be aware to find the right disusered.safe.js !!!

Sven