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.

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”.

  • 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”.

  • 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

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:

  1. Authenticated HTTPS request Request authenticated HTTPS to the IMQA server to collect the data normally.

  1. 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