Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Cant seem to access assets folder, when running android

$
0
0

@Mwzeyxaexia wrote:

Hey,
AM trying to download images from the server to my app. A using this method

download(folder,name) {
  const fileTransfer: FileTransferObject = this.transfer.create();
  const url = 'http://192.168.1.4/simon/img/'+folder+'/small/'+name;

  fileTransfer.download(url, this.file.applicationDirectory+"/img/"+folder+"/"+name+"").then((entry)
     => {
        console.log('download complete: ' + entry.toURL());
}, (error) => {
       console.log('download error: ' + error);
    });
}

I get this error in android studio console.

01-15 11:28:26.171 24115-24228/io.ionic.starter E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/www/assets/img/logos

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>