Android imposes limitations on the size of an app. Some older devices have size limits, Google Play also restricts the size of apps that can be downloaded. EachScape offers support for apps that can overcome these limits using a facility of Android called "Expansion Files." Builds created with this method will go slightly faster as well.
Apps consist of code, static assets (things you put in the Media Folder) and data sources. Local data sources can reference additional local files that are created by using the "download=" parameter. Those additional files may be of any type, but as long as your data sources use only images, audio and video files in conjunction with the "download=" parameter, a expansion file will work with your app.
Using expansion files is a simple process. On the Android tab of the App Edit page of the EachScape Builder, just check the box marked "Use Expansion File" and build the app.
When the app is created, all the local data sources and their downloaded files will be removed from the build and put into the expansion file. When the app is downloaded it will be very small.
When the app starts up, the expansion file will be downloaded and remain on the device until the app is deleted. (See note below about Ad Hoc builds on Android 2.2.) If the Expansion File is ever missing, then the next time the app runs it will re-initiate the download process. While the download process is running a progress bar is displayed in the notification center. These files will only be downloadable in the presence of a WiFi network.
Under the Covers
Builds are given an ID number. It's shown in the URL of the build when you are looking at the page in the EachScape Builder where the particular build is listed. Further down is a line showing the size of the expansion file and a download link.
To submit a commercial build, you will need to download the expansion file and supply it as part of the submission process.
On the device the expansion file must be named according to the app package name and bundle ID. For commercial builds, the package name is determined by the settings you supply in the App Edit page's Android tab. For the app shown above, assuming its package name is "com.example.myapp" then the submitted expansion file must be named "main.2949.com.example.myapp.obb" The number selected must match the build ID as described above. You do not need to consider any of this when installing Ad Hoc builds.
This facility is supported on Android commercial builds for Android 2.2 and higher. It is supported for Ad Hoc builds on Android 2.3 and higher, and we have now added support for Android 2.2 as well. For Ad Hoc builds, the app will automatically delete earlier expansion files for that app at startup, so you needn't worry about the files clogging up the device. In Android 2.2, the last expansion file installed will linger on the device after deleting the Ad Hoc build. You will need to manually delete it -- see the path and file name conventions below in the Appendix on Manual Install, for the file name and location. This is a limitation of the operating system.
Note: Android commercial builds require the expansion file to be downloaded from Google Play -- so if your commercial build is not hosted there, you will need to install the expansion file manually, "through the wire", as noted below.
Appendix: manual install
If you want to manually place the expansion file on the device -
1) Download the expansion file - that may be updated out of the build history, there is a link on the BUILD HISTORY page as indicated in the circled area in the illustration above
2) Rename the file to 'main.<build id>.<package name>.obb', where <build id> and <package name> are given by the illustrated fields above -- i.e., that file name would be 'main.2949.com.example.myapp.obb'. (Note: the <package name> is given in the Edit Application > Android tab; the <build id> is given by the URL on the build in the Build History - so for the build given by 'http://builder.eachscape.com/builds/2949' the <build id>=2949).
3) place this file on the SDCARD of the device using a mount and cable method, in the directory -
- for adhocs put in - '/Android/obb/com.eachscape.app<app id>' (i.e. ''/Android/obb/com.eachscape.app2949'")
- for commercial builds - '/Android/obb/<package name>/main.<build id>.<package name>.obb' (i.e. "/Android/obb/com.example.myapp/main.2949.com.example.myapp.obb")
The system will then be able to find the expansion file and should open it upon next launch.