Need a solution to build a apk that includes all build variants like mock, QA, DEV and change them with a drop down menu in the app.
Thanks in advance
Need a solution to build a apk that includes all build variants like mock, QA, DEV and change them with a drop down menu in the app.
Thanks in advance
This is not readily possible. As the google documentation says, "Each build variant represents a different version of your app that you can build." So, you're asking for an apk that includes other apks.
However, depending on what the differences are between your different variants, you can include those in some configuration object and then just switch between them according to the drop down menu. I've seen this used when the differences are just the API endpoints.
Or, if that's not possible and you do end up having to use different apk's, then you can load all of them and have another main apk that you can use to launch the right one based on some menu.