Reputation: 429
In http://developer.android.com/google/play/expansion-files.html under the "Download process" section, step 3 it says
"When the user launches your application, your app must check whether the expansion files are already saved on the device"
Is there any reason (e.g. framework restrictions or threading) for performing this check at startup? Can I delay this check/download, until I know that I need the APK expansion file?
Upvotes: 1
Views: 304
Reputation: 24306
You need to check for these files if your app requires them, but not if they are an optional part of your app and the user doesn't need to see the contents of the expansion files right away.
Expansion files are a workaround for Google's limit on the maximum size of an APK file. You only need to use expansion files if you have large media files, etc. In the documentation that you referenced, Google says that it can't guarantee that the expansion file will be delivered at the same time as the app, and that the app must therefore check for any required expansion files before using them. The app must also be able to initiate a download of these files (via HTTP) if they are required for the app to run. If your app must have these files to run, then you need to check for them at startup, initiate the download, tell the user what's happening, etc.
Upvotes: 1