2014-10-31 17:02:45 +01:00
|
|
|
/**
|
|
|
|
|
* Permet de faire l'interface entre phonegap et l'application customcamera en java.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
var exec = require('cordova/exec');
|
|
|
|
|
|
|
|
|
|
// constructor.
|
|
|
|
|
var customCameraExport = function() {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// add method.
|
2014-11-04 13:19:27 +01:00
|
|
|
customCameraExport.prototype.getPicture = function() {
|
|
|
|
|
alert("Oh yeah !");
|
2014-10-31 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
2014-11-10 10:09:52 +01:00
|
|
|
customCameraExport.prototype.startCamera = function() {
|
2014-11-10 10:42:47 +01:00
|
|
|
exec(
|
2014-11-10 10:09:52 +01:00
|
|
|
function(result) {
|
|
|
|
|
console.log("success");
|
|
|
|
|
console.log(result);
|
|
|
|
|
},
|
|
|
|
|
function(result) {
|
|
|
|
|
console.log("fail");
|
|
|
|
|
console.log(result);
|
|
|
|
|
},
|
2014-11-10 10:36:02 +01:00
|
|
|
"CustomCamera",
|
2014-11-10 11:19:27 +01:00
|
|
|
"testAction",
|
2014-11-10 10:09:52 +01:00
|
|
|
[]
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2014-10-31 17:02:45 +01:00
|
|
|
module.exports = new customCameraExport();
|