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.+'

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.

Last modified on