Skip to content

Commit fb19294

Browse files
committed
Update camera.android.ts
1 parent 4d14166 commit fb19294

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

camera/camera.android.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ export var takePicture = function (options?): Promise<any> {
4444
appModule.android.onActivityResult = previousResult;
4545

4646
if (requestCode === REQUEST_IMAGE_CAPTURE && resultCode === android.app.Activity.RESULT_OK) {
47-
47+
var imageSource: typeof imageSourceModule = require("image-source");
4848
if (saveToGallery) {
49-
resolve(picturePath);
49+
resolve({image:imageSource.fromFile(picturePath) ,path:picturePath});
5050
} else {
5151
var options = new android.graphics.BitmapFactory.Options();
5252
options.inJustDecodeBounds = true;
@@ -89,8 +89,7 @@ export var takePicture = function (options?): Promise<any> {
8989
break;
9090
}
9191

92-
var imageSource: typeof imageSourceModule = require("image-source");
93-
resolve(imageSource.fromNativeSource(scaledSizeImage), picturePath);
92+
resolve({image:imageSource.fromNativeSource(scaledSizeImage), path:picturePath});
9493

9594
}
9695
}

0 commit comments

Comments
 (0)