Android APK Expansion Files & Corona Enterprise

Hi,

i managed to implement APK expansion files for android with the new android studio / gradle project template.

Seems to work so far and Corona downloads the .obb file when it is missing.

Unfortunately, instead of a download screen i only see a blackscreen while corona downloads the obb file. Is it possible to show the Corona dowload screen or even better a custom download screen while corona downloads the .obb file?

Regards,

Josh

You need to add the following entries to your “AndroidManifest.xml” file…

\<manifest\> \<application\> \<meta-data android:name="targetedAppStore" android:value="google"/\> \<meta-data android:name="usesExpansionFile" android:value="true"/\> \</application\> \</manifest\>

You also need to add the following permissions to your “AndroidManifest.xml” file:

  • “android.permission.INTERNET”
  • “com.android.vending.CHECK_LICENSE”
  • “android.permission.WRITE_EXTERNAL_STORAGE”

And set up your “config.lua” file for Google Licensing according to the instructions in the link below.  This is because Google Licensing is used to download your expansion file once the app is verified as licensed, which includes Google test accounts.

   https://docs.coronalabs.com/guide/basics/configSettings/index.html#licensing

Finally, make sure that your expansion file name follows the following convention…

   “main.<VersionCode>.<PackageName>.obb”

Hi,

ive done all of that and the apk expansion files work correctly. The only problem that i have is that i dont see any user interface while corona downloads expansion files, only a black screen… but the download works as expected and when it`s finished the main.lua is loaded.

Regards,

Josh

Which daily build # of Corona Enterprise are you building with?

If you’re not sure, you can call our Lua system.getInfo(“build”) function from your enterprise built project.

I´m using build 2016.2948

I have one final question for you.

Are you 100% positive that you’re not actually including your Corona project files within your APK?

I ask, because I’ve never heard a situation such as yours and it might be that the expansion file is not getting downloaded, but your app is running fine because your Corona project files are bundled within your APK.

To double check, please do the following:

  1. Rename your APK extension to *.zip.
  2. Unzip the APK file.
  3. Look in the “assets” directory.

You should not see any of your images and audio files in this directory.  If it is, then odds are Corona is using these files.  For Android Corona Enterprise builds, you’ll probably want to set up a separate Corona project directory that only contains Lua files.  Perhaps via a pre-build script which copies from your main Corona project directory.

The APK does not contain any assets, they are all in the obb file. I have a 11 MB APK and 300 MB obb.

You need to add the following entries to your “AndroidManifest.xml” file…

\<manifest\> \<application\> \<meta-data android:name="targetedAppStore" android:value="google"/\> \<meta-data android:name="usesExpansionFile" android:value="true"/\> \</application\> \</manifest\>

You also need to add the following permissions to your “AndroidManifest.xml” file:

  • “android.permission.INTERNET”
  • “com.android.vending.CHECK_LICENSE”
  • “android.permission.WRITE_EXTERNAL_STORAGE”

And set up your “config.lua” file for Google Licensing according to the instructions in the link below.  This is because Google Licensing is used to download your expansion file once the app is verified as licensed, which includes Google test accounts.

   https://docs.coronalabs.com/guide/basics/configSettings/index.html#licensing

Finally, make sure that your expansion file name follows the following convention…

   “main.<VersionCode>.<PackageName>.obb”

Hi,

ive done all of that and the apk expansion files work correctly. The only problem that i have is that i dont see any user interface while corona downloads expansion files, only a black screen… but the download works as expected and when it`s finished the main.lua is loaded.

Regards,

Josh

Which daily build # of Corona Enterprise are you building with?

If you’re not sure, you can call our Lua system.getInfo(“build”) function from your enterprise built project.

I´m using build 2016.2948

I have one final question for you.

Are you 100% positive that you’re not actually including your Corona project files within your APK?

I ask, because I’ve never heard a situation such as yours and it might be that the expansion file is not getting downloaded, but your app is running fine because your Corona project files are bundled within your APK.

To double check, please do the following:

  1. Rename your APK extension to *.zip.
  2. Unzip the APK file.
  3. Look in the “assets” directory.

You should not see any of your images and audio files in this directory.  If it is, then odds are Corona is using these files.  For Android Corona Enterprise builds, you’ll probably want to set up a separate Corona project directory that only contains Lua files.  Perhaps via a pre-build script which copies from your main Corona project directory.

The APK does not contain any assets, they are all in the obb file. I have a 11 MB APK and 300 MB obb.