2014-11-01 00:02:45 +08: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 20:19:27 +08:00
|
|
|
customCameraExport.prototype.getPicture = function() {
|
|
|
|
alert("Oh yeah !");
|
2014-11-01 00:02:45 +08:00
|
|
|
};
|
|
|
|
|
2014-11-10 17:09:52 +08:00
|
|
|
customCameraExport.prototype.startCamera = function() {
|
|
|
|
cordova.exec(
|
|
|
|
function(result) {
|
|
|
|
console.log("success");
|
|
|
|
console.log(result);
|
|
|
|
},
|
|
|
|
function(result) {
|
|
|
|
console.log("fail");
|
|
|
|
console.log(result);
|
|
|
|
},
|
2014-11-10 17:36:02 +08:00
|
|
|
"CustomCamera",
|
2014-11-10 17:09:52 +08:00
|
|
|
"customCamera",
|
|
|
|
[]
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2014-11-01 00:02:45 +08:00
|
|
|
module.exports = new customCameraExport();
|