Hi tap
I am following too your initiative for helping us to better use C2 in appmobi environment, and how I am trying to use the javascript API camera commands, without sucess until now, I want to ask your help.
I am using a C2 plugin called CallJS, which connects C2 with JS scripts, so I saved the following code in a .js file, which I called from my C2 code.
document.addEventListener("appMobi.camera.picture.add",onSuccess);
document.addEventListener("appMobi.camera.picture.busy",onSuccess);
document.addEventListener("appMobi.camera.picture.cancel",onSuccess);
function PicImgs()
{
AppMobi.camera.importPicture();
}
function onSuccess(evt) {
if (evt.success == true)
{
return AppMobi.camera.getPictureURL(evt.filename);
}
else
{
if (evt.message != undefined)
{
alert(evt.message);
}
else
{
alert("error capturing picture");
}
}
}
After being compiled in XDK and installed, the result APK, in a Genesis Tab, as result I can open the native folders and pick some of the images in there, but not receiving the picture URI to use in C2.
And in this link you can find the .capx the CallJS plugin and the .js script, if you want to try.
dl.dropbox.com/u/18104402/calJS.zip
Can you help me? Thanks in advance!