Update camera.android.ts

This commit is contained in:
Osei Fortune
2016-05-09 12:15:31 -04:00
parent 4d14166db6
commit fb19294fcc

View File

@ -44,9 +44,9 @@ export var takePicture = function (options?): Promise<any> {
appModule.android.onActivityResult = previousResult; appModule.android.onActivityResult = previousResult;
if (requestCode === REQUEST_IMAGE_CAPTURE && resultCode === android.app.Activity.RESULT_OK) { if (requestCode === REQUEST_IMAGE_CAPTURE && resultCode === android.app.Activity.RESULT_OK) {
var imageSource: typeof imageSourceModule = require("image-source");
if (saveToGallery) { if (saveToGallery) {
resolve(picturePath); resolve({image:imageSource.fromFile(picturePath) ,path:picturePath});
} else { } else {
var options = new android.graphics.BitmapFactory.Options(); var options = new android.graphics.BitmapFactory.Options();
options.inJustDecodeBounds = true; options.inJustDecodeBounds = true;
@ -89,8 +89,7 @@ export var takePicture = function (options?): Promise<any> {
break; break;
} }
var imageSource: typeof imageSourceModule = require("image-source"); resolve({image:imageSource.fromNativeSource(scaledSizeImage), path:picturePath});
resolve(imageSource.fromNativeSource(scaledSizeImage), picturePath);
} }
} }