Issue description:
Functionality: A button to click picture and return the image data to the calling function. I dont get imageData on callback. Neither does it throw any error
Below is the code for controller:
MyApp.controller('ABCController', function ($scope, $cordovaCamera, $cordovaFile) {
$scope.customerDetails = {
customerId: "",
customerName: "",
customerMobile: "",
photoUri: "",
declarationUri: "",
docSet1SubmitStatus: 0,
idProofType: "",
id1Uri: "",
id2Uri: "",
idProofMultiImgReq: 0,
docSet2SubmitStatus: 0,
addressProofType: "",
address1Uri: "",
address2Uri: "",
addressProofMultiImgReq: 0,
docSet3SubmitStatus: 0
};
$scope.capturePhotograph = function () {
var options = {
quality: 90,
destinationType: Camera.DestinationType.DATA_URL,
sourceType: Camera.PictureSourceType.CAMERA,
allowEdit: true,
/*targetWidth: 1000,
targetHeight: 1000,*/
encodingType: Camera.EncodingType.JPEG,
popoverOptions: CameraPopoverOptions
};
$cordovaCamera.getPicture(options).then(function (imageData) {
$scope.customerDetails.photoUri = imageData;
console.log("Image: "+imageData);
}, function (err) {
console.log("Error: "+err);
});
}
});
->ionic info:
cli packages: (C:\Users\A619046\AppData\Roaming\npm\node_modules)
@ionic/cli-plugin-proxy : 1.5.8
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
Gulp CLI : not installed globally
local packages:
Cordova Platforms : android 7.0.0
Ionic Framework : ionic1 1.3.4
System:
Android SDK Tools : 25.3.1
Node : v6.11.2
npm : 3.10.10
OS : Windows 7
Environment Variables:
ANDROID_HOME : C:\Sanket\Eclipse\EclipseAndroid\sdk
HTTP_PROXY : http://A619046:Ssd%2F041828@10.87.140.12:84/
http_proxy : http://A619046:Ssd%2F041828@10.87.140.12:84/
HTTPS_PROXY : http://A619046:Ssd%2F041828@10.87.140.12:84/
https_proxy : http://A619046:Ssd%2F041828@10.87.140.12:84/
IONIC_HTTP_PROXY : not set
PROXY : not set
proxy : not set
Misc:
backend : legacy
->cordova plugins:
C:\Sanket\Workspace_IONIC\PSF_Latest>cordova plugins
cordova-plugin-actionsheet 2.3.3 “ActionSheet”
cordova-plugin-app-version 0.1.9 “AppVersion”
cordova-plugin-calendar 5.0.0 “Calendar”
cordova-plugin-camera 4.0.2 “Camera”
cordova-plugin-contacts 3.0.1 “Contacts”
cordova-plugin-datepicker 0.9.2 “DatePicker”
cordova-plugin-device 2.0.1 “Device”
cordova-plugin-dialogs 2.0.1 “Notification”
cordova-plugin-file 6.0.1 “File”
cordova-plugin-geolocation 4.0.1 “Geolocation”
cordova-plugin-ionic-webview 1.1.16 “cordova-plugin-ionic-webview”
cordova-plugin-network-information 2.0.1 “Network Information”
cordova-plugin-spinner-dialog 1.3.1 “SpinnerDialog”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-sms-plugin 0.1.11 “Cordova SMS Plugin”
cordova-sqlite-plugin 3.1.1 “Cordova SQLite Plugin”
ionic-plugin-keyboard 2.2.1 “Keyboard”
->Device Info:
Running on device not emulator.
- Nexus 5 | Android: 6.0.1
- Moto G5s | Android: 7.1.1
I have tried removing platform and then adding it again & installing plugin of a different version.