Using cordova 2.6.0. And a plugin on the android side.
The issue is that i am trying to pass a base-64 string to my plugin, but there was an error :
java.lang.IllegalArgumentException: bad base-64
Tried to debug it and found that there is a mismatch in size between the sent base-64 string from javascript(from cordova.exec function) and the received plugin in java. The size of the string in java is nearly half of the original string.
Verified the same by pasting both strings in a browser. Browser displayed the image for the javascript part and not for the java part.
Also tried to stringify the JSON object (containing the base-64 string), and pass it to the plugin. But then also there is a mismatch in size(same as above).
Have tried for different images, receiving the same result.
A solution is to break the sent base-64 string to some parts and use it again on the java/plugin side.
I am receiving the arguments in a JSON Array, there might be a limit in that maybe. M not sure.
Hope some one can help and tell where am I going wrong.