HriBB
June 15, 2015, 8:27pm
1
What is the best way to handle multiple APKs for Google Play Store with Ionic and crosswalk?
I want to create 3 versions
app-lollipop.apk (no crosswalk)
app-pre-lollipop-x86.apk (with crosswalk)
app-pre-lollipop-armv7.apk (with crosswalk)
I want devices with Lollipop to load app-lollipop.apk.
I want devices before Lollipop to load app-pre-lollipop-arch.apk.
Any ideas on how to configure Ionic project to handle this?
I use the same approach with one of my apps, here is my workflow. Unfortunately it’s a little bit time-consuming.
Add android-minSdkVersion
in config.xml
for minimum supported API level (Crosswalk versions only).
<preference name="android-minSdkVersion" value="16"/>
Add Crosswalk: $ ionic browser add crosswalk
Build Crosswalk APKs for x86 and armv7: $ ionic build android --release
(APKs located in project/platforms/android/build/outputs/apk
)
Remove Crosswalk: $ ionic browser revert android
Build APK for Android 5+: $ ionic build android --release -- --minSdkVersion 21
(APK located in same directory)
Sign, upload (advanced mode in Google Play Developer Console) and publish all APKs
Suggestions and improvements are more than welcome
1 Like
Someone also posted some scripts to help with this over on github.
Would be great to get this integrated into the CLI.
I’ve been doing this for a while, but I recently noticed from the google play console that the
app-pre-lollipop-x86.apk
is preferred for the install, even for newer versions. Are others seeing this too?
How do you get around it?