MobileFirst with Google App Bundle and Dynamic Delivery In Native Android Apps

Google I/O 2018 announced a new publishing format for Android Developers - Android App Bundle.

App Bundle enables you to deliver an optimised app to the end user, this is significantly smaller in size than using the traditional apk. This technology extends to enable developers to roll out features on demand to users with Dynamic Delivery.

MobileFirst with Dynamic Delivery

Configuration

To create your app with Android App Bundle and Dynamic Delivery features follow the blog Get started with Android App Bundles .

To call MobileFirst APIs from the base application module of a multi-feature app, no additional configuration is required.

To call MobileFirst APIs in feature modules, use the api declaration instead of implementation. Using implementation will restrict the access of the MobileFirst APIs within the same module, while using api would make MobileFirst APIs available across all modules present in the app including feature modules. For more details read API and implementation separation.

Make the following changes in the build.gradle file of your base app to call MobileFirst APIs from an app enabled for Dynamic Delivery.

From

implementation ’com.ibm.mobile.foundation:ibmmobilefirstplatformfoundation:8.0+’
implementation ’com.ibm.mobile.foundation:ibmmobilefirstplatformfoundationjsonstore:8.0+
implementation 'com.ibm.mobile.foundation:ibmmobilefirstplatformfoundationpush:8.0.+'

To

api ’com.ibm.mobile.foundation:ibmmobilefirstplatformfoundation:8.0+’
api ’com.ibm.mobile.foundation:ibmmobilefirstplatformfoundationjsonstore:8.0+’
api 'com.ibm.mobile.foundation:ibmmobilefirstplatformfoundationpush:8.0.+'

Limitation

Due to the difference in packaging structure of an App Bundle between Android 5.x and Android 6.x & above devices, users on Android 5.x will not be able to connect to a MobileFirst server when App Authenticity is enabled and distributed as an App Bundle on Play Store. This limitation is observed only with combination of Android 5.x + App Authenticity + Android App Bundle. As a workaround, upload your app as a regular .apk file to the Play Store or restrict the minimum Android version to Android 6 or above or have a separate version of the app for Android 5.x devices.

We have validated all the MobileFirst functionalities from both base module and feature module of an Android Native app. You can exploit the Google App Bundle and Dynamic Delivery features with your MobileFirst native Android apps. Refer to the MobileFirst Native Android sample app with App Bundle and Dynamic Delivery features from here.

Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.
Last modified on