You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mobile application has an identifier called package name (applicationId). When mobile app installed for internal testing and we want to switch to the production app, the app is updated and testing app is not longer on device and vice versa. This happens due to having the same package name for testing and production. This causes hindering in testing the app on mobile by having to multiple times switch between these apps and also causes confusion.
Hence to tackle this issue we would like to have variable package names for testing and production, so that multiple apps are on the device and have the ability to test simultaneously.
Implementation Steps/ Context
The applicationId can be found in the file /android/app/build.gradile, which looks something like this
There are build flavours we can use to have different applicationId, details can be found here. this works for our purpose and can be implemented with ease.
If we want to have the variable applicationId for each build it is a bit tricky but we should be able to leverage GitHub actions set the applicationId prefix as a hash of the PR (this is being done for mere preview environments). Now how we can set that is another issue. The idea is to create a new file inside the android folder called local.properties which is like and environment file.
local.properties can have the variable names with values
BUILD_HASH=******
and this hash can be used in the build.gradle file by importing the file content
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def buildHash = properties.getProperty('BUILD_HASH')
The buildHash can be used in the flavours for prefix and that should work for our purpose.
The text was updated successfully, but these errors were encountered:
codVenturer
changed the title
Feature: Add Support for Variable Package names for ease in Testing
Feature Request: Add Support for Variable Package names for ease in Testing
May 16, 2024
bbbneo333
changed the title
Feature Request: Add Support for Variable Package names for ease in Testing
feat: Add Support for Variable Package names for ease in Testing
Jul 17, 2024
Description
The mobile application has an identifier called package name (applicationId). When mobile app installed for internal testing and we want to switch to the production app, the app is updated and testing app is not longer on device and vice versa. This happens due to having the same package name for testing and production. This causes hindering in testing the app on mobile by having to multiple times switch between these apps and also causes confusion.
Hence to tackle this issue we would like to have variable package names for testing and production, so that multiple apps are on the device and have the ability to test simultaneously.
Implementation Steps/ Context
/android/app/build.gradile
, which looks something like thislocal.properties
which is like and environment file.local.properties
can have the variable names with valuesand this hash can be used in the
build.gradle
file by importing the file contentThe
buildHash
can be used in the flavours for prefix and that should work for our purpose.The text was updated successfully, but these errors were encountered: