How do I Load image from URL and save it?

0 favourites
  • 3 posts
From the Asset Store
Progress\Loading Bar
$2.40 USD
40% off
Progress\Loading Bar. Now Load you game like a Professional.
  • Hey,

    I'm creating an Android app and have some backgrounds I don't want to include into the app files, so I load them from my server with "load image from url". Is it possible to load them only once? So when loaded, automatically save them in the game directory on an android device and then check on every start if it's already downloaded?

    Thanks for your help!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could save them in local storage as base64. Not sure how efficient that is, but storing/extracting is pretty straightforward given you’ve done most of the work already. Then just keep a record of what has been downloaded, and only download images if they’re not in the record.

  • Might run into trouble with the 5MB localstorage limit. Although I'm not actually sure if that's a thing that applies to Construct? I feel like more people would have run into problems by now with even just normally saving a game with just 5MB.

    I'm sure there are ways to access device storage but I am not familiar with them. Would probably need JavaScript.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)