Cordova-plugin-camera takePicture callbacks not working on Ionic 1 and android 7

Why cordova-plugin-camera callback function not working on Android 7 in ionic1 when picture capture.

I am trying to upload image and show preview in my app Ionic1 using cordova plugin-camera.
I have created Service for this plugin and call functions takePicture function on the Android version 6.0.1 its working fine But on the Android 7 camera open and take picture after taking picture ,click ok then nothing happens navigate to Home page and no callback call in android 7.

cordova-plugin-camera v= 2.4.1
cordova-plugin-compat v= 1.1.0
Node js 6.10.3

What should i do for this to work on the Android 7
Below is the code i am using.
CameraSvc.takePicture({}, function(data) {
var card = ‘data:image/jpeg;base64,’ + data;
if (side === ‘Card - Front’) {
scope.frontImageData = card;
} else {
scope.backImageData = card;
template: ‘Saving image…’
if (card || metadata) {
var callback = function() {
scope.frontImageData = scope.backImageData = scope.frontImageMetadata = scope.backImageMetadata = null;
LocalImagesSvc.saveUpdateImage(side, card, metadata, callback, callback);