Image download for all device in android

Hi very urgent clarification , i can download and view image in android lollipop device but its nor working on any other android device…pls suggest me

my code below here :-1:

import {Transfer, TransferObject} from ‘@ionic-native/transfer’;

download(y)
{
const fileTransfer: TransferObject = this.transfer.create();
var url = encodeURI(‘http://localhost:8000/’+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");

});
}