mirror of
https://gitee.com/shuto/customCamera.git
synced 2024-10-06 10:22:07 +08:00
34 lines
699 B
JavaScript
34 lines
699 B
JavaScript
/**
|
|
* 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.
|
|
customCameraExport.prototype.getPicture = function() {
|
|
alert("Oh yeah !");
|
|
};
|
|
|
|
customCameraExport.prototype.startCamera = function() {
|
|
cordova.exec(
|
|
function(result) {
|
|
console.log("success");
|
|
console.log(result);
|
|
},
|
|
function(result) {
|
|
console.log("fail");
|
|
console.log(result);
|
|
},
|
|
"CustomCamera",
|
|
"customCamera",
|
|
[]
|
|
);
|
|
};
|
|
|
|
module.exports = new customCameraExport(); |