Tips & Tricks: how to make large apps

by Giuseppe Lanzi on 11/06/2013

One of the most obvious changes that mobile devices have brought to our everyday lives has to do with multimedia services. There are many apps created specifically for distributing audio and video content: the Louvre’s audio guide and Picasso – The Life, The works in HD are just two of the possible examples. Today I want to talk to you about the element these two apps share: the need to transfer very large files to the device so they can be displayed to the user even when there is no network. But how to achieve this with Instant Developer?

The first approach we might try is to add the list of files to be copied to the device to filelist.txt so that they are transferred automatically during normal installation. It’s a simple solution, but it can turn out to be bothersome for the user if the size of the installation packages grow too large. For example, the Picasso app is 427 MB. And what if the overall size of the content stretches to a few GB? Clearly, we need another method.

The solution to the problem is what the Louvre has done: manage the content download through code, integrating into the app an actual installation form to display to the user until everything that’s absolutely necessary has been downloaded. I wrote an example project on how to achieve this behavior with Instant Developer. In particular, I:

  • added to the custom folder a text file called list.txt containing the list of URLs at which the content to be installed is located;
  • created an installation form to show the user until the application finishes downloading all the essential files;
  • managed any subsequent downloads of non-essential content;
  • allowed the user to delete whatever they don’t want anymore to save space.

There are three main advantages to this method: it’s possible to partialize the installation by downloading only the content the user wants, it’s possible to use the app even during the download using asynchronous mode, and it’s not necessary to update the app installation package when new content is released.

Creating large apps will never be a problem again.

Leave a Comment

Previous post:

Next post: