Save Canvas image to the device/gallery on android


So i am trying for a few days now to take an image from the Canvas of my application and save that to the device… i’ve tried some (with no result) plugins like: Save2Canvas, Base64 To Gallery, Canvas2ImagePlugin and Cordova base64ToGallery Plugin…

I am using:
Cordova 7.0.1
Ionic 1.x

Right now the part of my Js. function to save is like this

  var image = canvas

Wich works on ionic 1.x via browser but not on the device…