For Android mobile app developers, it’s obvious to create a variant for the application events, while keeping the core functionality of the app intact. It is just like preparing the different dishes using the same core ingredients and adding more flavor to get a different taste.
Initially, for creating the few events it is manageable to change the files to suit the specific events. However, the problem arises when more events are added making the code maintenance a massive headache!
Managing the app versions with Product flavors
Product flavors enable Android developers to create different product versions using a single codebase that you expect to co-exist on a single application.
For better understanding first, take a look at different situations where we can use product flavors.
If the app is developed by a certain company and is rebranded by another company. In such situations, the app is released with minor changes such as logos, colors, and other minor features. Here, the core functionality of the app remains unchanged.
If the app has free and paid versions, you can limit the features in the free version and expose all the other features in the free version of the application.
If you want to add region-specific features depending on the country or continent.
Product flavor solves the issue of maintaining a separate project code base for each app version. They keep code clean and readable.
» About DhiWise
DhiWise is a ProCode platform for accelerating the development of next-generation web and mobile applications using the latest technologies such as Kotlin, React, Flutter, Swift, and Node.
It aims to empower developers so that they can build a scalable, cleaner, and testable application faster without compromising on app quality.
DhiWise Android app builder speeds up the development of Android applications through advanced features such as design to code conversion, setting up navigation, creating actions and lifecycle methods, API integrations, managing product flavors, and more.
Let us understand how you can create the product flavor configuration of your application.
Here is the snapshot of DhiWise Product flavor page.
You need to enter the key name, data type, and values for configuring different flavors of the Android app.
Following are the data types allowed for the key:
Once done click on the “Save” button to apply the changes. Further, you can add/ edit/remove values at any point during the app development.
So, you do not need to write the code for different release types manually. Also, the generated code in the app is fully customizable which means you can modify the generated code according to your requirement.
If you are already using Android app builder, give us your feedback, we will give our best to improve the platform.