mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
Change to use Commands and CommandManager.
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
com.phonegap.CameraLauncherProxy = function() {
|
||||
this.className = "com.phonegap.CameraLauncher";
|
||||
};
|
||||
com.phonegap.CameraLauncherProxy.prototype.setBase64 = function(b) {
|
||||
return PhoneGap.exec(this.className, "setBase64", [b]);
|
||||
};
|
||||
com.phonegap.CameraLauncherProxy.prototype.takePicture = function(quality) {
|
||||
return PhoneGap.exec(this.className, "takePicture", [quality]);
|
||||
};
|
||||
com.phonegap.CameraLauncher = new com.phonegap.CameraLauncherProxy();
|
||||
|
||||
/**
|
||||
* This class provides access to the device camera.
|
||||
*
|
||||
@@ -34,10 +45,10 @@ Camera.prototype.getPicture = function(successCallback, errorCallback, options)
|
||||
this.errorCallback = errorCallback;
|
||||
this.options = options;
|
||||
if (options.quality) {
|
||||
GapCam.takePicture(options.quality);
|
||||
com.phonegap.CameraLauncher.takePicture(options.quality);
|
||||
}
|
||||
else {
|
||||
GapCam.takePicture(80);
|
||||
com.phonegap.CameraLauncher.takePicture(80);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -52,7 +63,6 @@ Camera.prototype.success = function(picture) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Callback function from native code that is called when there is an error
|
||||
* capturing an image, or the capture is cancelled.
|
||||
|
||||
Reference in New Issue
Block a user