These are instructions for configuring an Android expansion pack for an Ionic project (Cordova 5.0). These instructions include the bundle ID of a specific app, please replace with your own.
- Cordova APK Reader Plugin
- Cordova APK Reader Plugin: Issues Thread
- Adding an Android APK Expansion File to a Cordova Project
- Create a directory named
main_expansion
in the root directory of your project. Place any expansion files inside this folder. - Create archive:
zip -v -dc -r -x \*.DS_Store -Z store main_expansion main_expansion
Rename main_expansion.zip
using the following format: [main|patch].<expansion-version>.<package-name>.obb
Example:
main.100002.com.companyname.myapp.obb
Create directory com.companyname.myapp
inside of /Android/obb/. Result should be: <Device Storage>/Android/obb/com.companyname.myapp/
For Ben Bunny:
<Device Storage>/Android/obb/com.code_monkeys.app.benbunny/
Note: Replace any hyphens with an underscore. Our domain is actually code-monkeys.com
.
Previous:
<img src="folder/wallpaper2.png">
Updated:
<img src="content://com.companyname.myapp/main_expansion/folder/wallpaper2.png">
For Ben Bunny:
<source src="content://com.code-monkeys.app.benbunny/main_expansion/videos/page3.mp4" type="video/mp4">
cd ~
mkdir -p ~/projects/cordova-plugins
cd ~/projects/cordova-plugins
git clone git@github.com:agamemnus/cordova-plugin-xapkreader.git
cd cordova-plugin-xapkreader
git checkout cordova-5.0
ionic plugin add ~/projects/cordova-plugins/cordova-plugin-xapkreader
In android.json, look for and modify com.test.expansion and YOUR_GOOGLE_PLAY_LICENSE_KEY:
expansion authority URI (xapk_expansion_authority
):
com.code-monkeys.app.benbunny
google play public key (xapk_google_play_public_key
):
Note:
Remove any duplicate entries for xapk_expansion_authority
& xapk_google_play_public_key
.
Modify build-extras.gradle (platforms/android/com.flyingsoftgames.xapkreader/$PROJECT_NAME-downloader_library/build-extras.gradle)
Modify build-extras.gradle (platforms/android/com.flyingsoftgames.xapkreader/benbunny-downloader_library/build-extras.gradle)
Replace $PROJECT_NAME-library
with benbunny-library
Replace file contents with:
dependencies {
debugCompile project(path: ':com.flyingsoftgames.xapkreader:benbunny-library',configuration: "debug")
releaseCompile project(path: ':com.flyingsoftgames.xapkreader:benbunny-library',configuration: "release")
}
I've tried every combination, including relative paths... I can't get it to compile.
Also tried
..:
for relative paths to up a level.where path is this with app name 'explore'