I got black image as screenshot in android 5+ Versions

/* Cordova Screenshot Code*/

app.service('$cordovaScreenshot', ['$q', function ($q) {
    return {
        capture: function (filename, extension, quality) {
            extension = extension || 'jpg';
            quality = quality || '100';

            var defer = $q.defer();

            navigator.screenshot.save(function (error, res) {
                if (error) {
                    console.error(error);
                    defer.reject(error);
                } else {
                    console.log('screenshot saved in: ', res.filePath);
                    defer.resolve(res.filePath);
                }
            }, extension, quality, filename);
            return defer.promise;
        }
    };

}]);

/* Social Sharing Code */

$scope.shareAnywhere = function () {
    $('.share_overlay').show();
    $cordovaScreenshot.capture()
     .then(function (result) {
         $cordovaSocialSharing.share(null, null, 'file://' + result, null).then(function (result) {
             $('.share_overlay').hide();
         }, function (err) {
             $('.share_overlay').hide();
             console.log("there was an error sharing!");
         });
     }, function (err) {
         $('.share_overlay').hide();
         console.log("there was an error taking a a screenshot!");
     });
}

I also used that crosswalk line

What is the underlying Cordova plugin you are using to make these screenshots?

I used this plugin for taking the screenshot.

This refers to this?
GitHub - gitawego/cordova-screenshot: screenshot plugin for cordova/phonegap

Thanks for your reply. But i have already gone through the link and applied the same. The result is same(Black Screen). Try to help me out in this. Advance thanks.

Post your ionic info output please.
Also post your ionic cordova plugin list output please.
Where exactly did you add that line? What did you do afterwards?