Image downloader ion ionic 2

Hi i have download a image from url and its saved in my mobile but its not accessing by gallery but i have to seen in file manager and same time while am retrieve it ,it ll not work.
ex. this.imageSrc=entry.url();
its not view in html so could you help me?

Please place your code here, so that anybody can provide very direct answer to your issue.

here is my code

const fileTransfer: TransferObject = this.transfer.create();
var url = encodeURI(‘http://localhost/public’ + y.image);
alert(url+“url”);
this.img_path = cordova.file.externalRootDirectory + ‘DCIM/Homework/’+this.selected_date +’/’+ y.image;

fileTransfer.download(url, this.img_path )
.then((entry)=>{
alert('download complete: ’ + entry.toURL());
this.imageSrc = entry.toUrl();

}, (error) => {
  console.log("error", "Error file transfert");

});

const fileTransfer: TransferObject = this.transfer.create();
var url = encodeURI(‘http://localhost/public’ + y.image);
alert(url+“url”);
this.img_path = cordova.file.externalRootDirectory + ‘DCIM/Homework/’+this.selected_date +’/’+ y.image;

fileTransfer.download(url, this.img_path, true )
.then((entry)=>{
alert('download complete: ’ + entry.toURL());
this.imageSrc = entry.toUrl();

}, (error) => {
  console.log("error", "Error file transfert");
});

I have just added third parameter in download function as true. Please try adding that.

yeah its working …thanks but it could not access in gallery …and if i open second time it will get it from local not from url…Any help?