Installing Crash SDK
If you add IMQA Crash to an Android project, you can check the performance issues of the application, which occur in the app developed with Java or Kotlin, in various viewpoints.
This is not required for Android if you have already installed the MPM.
Please install Crash SDK after creating an iOS project at the IMQA project page and receiving the project key.
1. Installing the SDK
Generally, it can be found in “<project_dir> /app/build.gradle”.
• Open the “app.gradle” file in Android Studio. • Add “mavenCentral()” to the repositories. • Add “imqa-crash-client” to the dependencies.
The gradle file should be synchronized after updating the file.
2. Basic setting
Internet setting
Add Internet authority to the “AndroidManifest.xml” project to upload occurred crash information.
Initializing IMQAController
Insert codes that initialize IMQAController into the “Application” class of the project. You can receive PROJECT_KEY after creating a project on the IMQA website.
⚠️ HTTPS (API level > 27)
The HTTPS request is required from Android API level 28 and above due to the enhanced network security policy. The following measures are needed to meet the requirement:
Authenticated HTTPS request Request authenticated HTTPS to the IMQA server to collect the data normally.
Forced HTTP request You can allow all cleartext HTTP traffic by setting this flag.
Using Zstandard (Zstd)
You can use Zstandard, which is an algorithm enabling more secure and efficient data compression, instead of the typical gzip. To use it, you need the following settings:
• Setting the MPM Mode Option You can set whether to use Zstd in the settings when inserting the IMQA startup code.
• Add Zstd Library In the “app.gradle” file, add the “zstd-jni” aar library to the “dependencies” block in “buildscript”.
3. ProGuard setting
ProGuard is a tool used to make the APK as small as possible in size by removing unused resources and shortening the name of classes or methods. When using ProGuard or DexGuard, the original class and method name can be displayed on the crash report by uploading the mapping file as below:
Preparation
If ProGuard is used in a project under development, the source code is obfuscated, making the analysis difficult. In this case, obfuscated codes can be analyzed using the generated mapping.txt file. Add the following to ProGuard rules (proguard-rules.pro):
A file is created in the app/build/outputs/mapping/debug (or release)/mapping.txt directory. (The file location may differ a little depending on the buildType and flavor.) You need to connect to http://crash.imqa.io to upload the file created in this way.
When uploading the file, its name must be named as “mapping.txt” or “map.txt”.
Upload process
1. Select “Setting” at the project menu.
2. Click the [File Upload] button to open the upload window.
3. Click the [Choose File] button that matches the app version specified in the gradle and upload the “mapping.txt” file.
4. If you click the [Upload] button, the crash information collected afterwards will be displayed after analysis.
When the latest version of the app is released, please register additional mapping files of the same app version in order to view the version’s crash information.
4. Settings required for the installation-type
Any client who selects an IMQA installation-type must set the collection server.
Last updated