Distinguishing Environments: Staging vs. Production
Are you supporting an application being developed in a staging (testing) or production environment? This distinction is crucial, as each environment has different characteristics and requires specific strategies. It impacts everything from how the application handles errors to how logs are generated and retrieved.
Staging Environment: Ideal for testing, with a lower security level to facilitate log analysis. Additionally, it does not require synchronization with Google Play, allowing the application to be installed directly from any .apk (Android installation package).
Production Environment: Mission-critical, enforcing additional rules and restrictions to ensure security and stability.
When troubleshooting application issues, the first step is identifying which environment the issue should be addressed in.
First Tech SDK Library Dependencies Behavior
First Tech provides two library dependencies within the same repository. To integrate them correctly, it is essential to properly configure the group, library name, and version in the project's package manager.
This applies regardless of the programming language (e.g., in Java, this would be within the build.gradle
file). Proper configuration ensures that the package manager references the appropriate library.
The reference below serves as a useful tool for correctly setting up both environments.
Next, search for or request the following strings in the dependency management settings within the code or in the log files, looking for something similar to the examples below:
Example Reference in the Testing/Staging Environment:
com.first-tech:taponphone-sdk-v2-hml
Example Reference in the Production/Release Environment:
com.first-tech:taponphone-sdk-v2-release
How to Identify
There are different ways to identify which environment the application is running in:
Method 1: Check the Dependency Manager Configuration File
Verify the dependency manager configuration file used in the programming language chosen for implementation.
For example, if the customer is using Java or Kotlin DSL, simply open the build.gradle
file and check the notations (directives responsible for locating and including library dependencies during the application build process).
dependencies {
hmlImplementation(libs.taponphone.sdk.v2.hml)
releaseImplementation(libs.taponphone.sdk.v2.release)
}
Another example with Kotlin and Gradle Groovy DSL
dependencies {
hmlImplementation libs.taponphone.sdk.v2.hml
releaseImplementation libs.taponphone.sdk.v2.release
}
Another example using different approach:
dependencies {
add("hmlImplementation", libs.taponphone.sdk.v2.hml)
add("releaseImplementation", libs.taponphone.sdk.v2.release)
}
For other programming languages, ask the developer to check or show where to locate, within the library and dependency manager configuration file, the references corresponding to these addresses.
Method 2: Analyze the Application Log Output
Ask the developer to do the following:
Call 'adb' to Start your Log Process
Inside command line window referencing your project file folder,use the commands bellow:
adb logcat
this command will show the logs in your console window
adb logcat > logs.txt
this command will send all the logs to saved text file. It is very usefull if you need to send to support department or attach in opened a tickets
After the developer runs the application and attempts to send a transaction, the environment being used can be identified by checking the SDK’s request URL for each backend.
The developer should look for the corresponding string:
gwpay-hml.first-tech.net
→ Staging Environmentgwpay-prod.first-tech.net
→ Production Environment
Example for Testing/Staging Environment
01-13 15:41:30.503 26564 3470 I okhttp.OkHttpClient: --> POST https://gwpay-hml.first-tech.net/v3/bff/pos/initialize
Example for Production/Release Environment
01-13 15:41:30.503 26564 3470 I okhttp.OkHttpClient: --> POST https://gwpay-prod.first-tech.net/v3/bff/pos/initialize
Last updated