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?
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.
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.
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:
Rename your APK extension to *.zip.
Unzip the APK file.
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.
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.
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.
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:
Rename your APK extension to *.zip.
Unzip the APK file.
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.