Installing MPM SDK
If you add IMQA MPM 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.
Min SDK : 14
Target SDK : 33
Build Tool : ~7.2
Gradle Wrapper : ~ 7.1.3
Kotlin : ~ 1.3.21
Android Studio : ~ Giraffe
Please install Crash SDK after creating an Android project at the IMQA project page and receiving the project key.
1. Installing Gradle plugin
In the “app.gradle” file, add “imqa-mpm-injector” to the ”dependencies” block in “buildscript” and add “plugin” to the top. Generally, it can be found in “<project_dir> /app/build.gradle”.
If the app project structure is not the basic Android Project structure, quick build using Gradle's daemon is set, or SDK is not applied properly (native UI loading time (Webview X), network response time, etc. are not collected. Please apply by referring to 'Installing MPM SDK > Gradle Plugin Detailed setting'.
The gradle file should be synchronized after updating the file.
java
kotlin
java + kotlin
Kotlin DSL
java
kotlin
java + kotlin
2. Gradle Plugin Detailed setting
It can be applied when the app project structure is not the basic Android Project structure, when quick build using gradle's daemon is set up, when SDK application does not work properly (native UI loading time (Webview X), or when network response time, etc. cannot be collected.
In the “app.gradle” file, add “imqa-mpm-injector” to the “dependencies” block in the "buildscript" followed by “plugin” at the top. This is typically located in “<project_dir>/app/build.gradle”.
The gradle file should be synchronized after updating the file.
java
kotlin
java + kotlin
Kotlin DSL
java
kotlin
java + kotlin
3. Adding authority to the Android Manifest
You have to grant Internet authority to upload occurred crash information to AndroidManifest.xml.
4. Inserting the IMQA initialization code into the source code
Writing the IMQA start code
The code should be inserted into the application class, not activity.
At this time, insert the copied “Project Key” value into “PROJECT_KEY”.
MPM Mode Option
You can change the IMQA MPM execution options using parameters or options. Check the execution options in Android MPM Configuration Options.
Shortcut mode
You can initialize IMQA MPM using the shortcut mode.
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: (* Only available in paid plan.)
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”.
5. Issues in the current version
ASM
Conflict may occur with the library using ASM.
APK Repackaging
Source line information disappears while repackaging the APK. The auto-insert function should be executed during compilation, in order to include line information.
Collecting library information
The auto-insert function is not executed in the class file added to the library. The auto-insert function should be executed while repackaging the API, in order to collect information on what is executed in the library.
6. Settings required for the installation-type
Any client who selects an IMQA installation-type must set the collection server.
Last updated