Skip to content

Commit

Permalink
updated stop() implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitya Santosh committed Dec 11, 2023
1 parent 41b7803 commit 108001f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/android/CameraLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ else if ((this.srcType == PHOTOLIBRARY) || (this.srcType == SAVEDPHOTOALBUM)) {

return true;
} if (action.equals("stop")) {
this.stopCamera();
this.stopCamera(destType);
return true;
}
return false;
Expand Down Expand Up @@ -355,7 +355,7 @@ public void takePicture(int returnType, int encodingType)
// LOG.d(LOG_TAG, "ERROR: You must use the CordovaInterface for this to work correctly. Please implement it in your activity");
}

public void stopCamera() {
public void stopCamera(int returnType) {
LOG.d(LOG_TAG,"Stopping Camera");
try {
this.cordova.getActivity().finishActivity((CAMERA + 1) * 16 + returnType + 1);
Expand Down
2 changes: 1 addition & 1 deletion www/Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ cameraExport.getPicture = function (successCallback, errorCallback, options) {
* Closes the Camera on calling this method
*/
cameraExport.stop = function (successCallback, errorCallback) {
exec(successCallback, errorCallback, 'Camera', 'stop', []);
exec(successCallback, errorCallback, 'Camera', 'stop', []);
};

/**
Expand Down

0 comments on commit 108001f

Please sign in to comment.