Search code examples
lwuitcodenameone

Open resource file from phone file system


Is it possible in codename one to download a resource file from server, store it in phone memory, and open in application? It can be a good opportunity to support application after release.


Solution

  • Sure. You can just download the file using a standard ConnectionRequest and save it using the Storage API. The Resources class has an open method that accepts an InputStream for you to open this later on.