# Troubleshooting

This document compiles common issues you might encounter during Android integration, helping you troubleshoot effectively.

# Why Does the SDK Display a Different Language Than Specified?

Normally, you can specify the SDK's display language through the last parameter of the init method. If not set, the SDK will initialize using the device language.

To ensure optimal user experience, AIHelp implements a language correction logic:

  1. We standardize different language codes. For example, zh / zh-cn / zh-CN / zh_CN / zh-hans are all converted to zh-CN for processing;
  2. If the corrected language isn't enabled in the backend, it will be corrected to the default language set in the AIHelp backend;

The AIHelp backend typically defaults to English as the fallback language. This default can be adjusted based on specific requirements.

Note that AIHelp API currently accepts ISO 639-1 language codes. Country codes should not be used during initialization, as some country codes might conflict with language codes. For example, 'KR' represents South Korea in country codes but refers to the Kanuri language in language codes.

If your project currently uses country codes, we recommend mapping ISO-3166 country codes to ISO 639-1 language codes before passing them to AIHelp.


# How to Handle Permissions for Image and Video Selection?

AIHelp handles all permission request logic internally. You only need to declare the relevant permissions in your manifest file.

For targetSdkVersion <= 32, simply configure storage permissions:

<uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE"
    tools:node="replace" />
<uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE"
    tools:node="replace" />

Note that tools:node="replace" is required to override declarations from other SDKs, ensuring your app's declarations take priority.

For targetSdkVersion >= 33, restrict storage permissions to API 32 and separately request media permissions for Android 13+:

<uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE"
    android:maxSdkVersion="32"
    tools:node="replace" />

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

Both android:maxSdkVersion="32" and tools:node="replace" are required.

Android 13 deprecated storage permissions, requiring API limitation to 32 when declaring storage permissions. The configuration above helps override declarations from other SDKs, ensuring your app's declarations take priority.


# Why Do Some Devices Show Permission Errors Without Settings Options?

This issue occurs on Android 13 devices when using AIHelp versions below v3.4.0 with targetSdkVersion >= 33, due to deprecated storage permissions.

Solutions:

  1. Upgrade to AIHelp v3.4.0 or later, or

  2. Restrict storage permissions to API 32:

<uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE"
    android:maxSdkVersion="32"
    tools:node="replace" />

If issues persist, check WRITE_EXTERNAL_STORAGE permission and apply the same API version restriction:

<uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE"
    android:maxSdkVersion="32"
    tools:node="replace" />

Note: Storage permissions are not required by AIHelp. If your app doesn't need them, you can use remove instead of replace to forcibly remove these permission declarations.


# Why Does Player Information Show as 'anonymous' with Random Characters?

By default, before calling the updateUserInfo API, AIHelp uses 'anonymous' as the username and 'deviceId' as the user ID.

UID information isn't synchronized with the backend until the AIHelp page opens. Since UID is stored in memory, sessions work correctly if UID is available before page opening.

If information isn't showing in the backend, the API likely wasn't called effectively.

This might be due to timing - the API must be called after initialization:

AIHelpSupport.init(/* your code here */);
AIHelpSupport.updateUserInfo(/* your code here */);

The updateUserInfo call only needs to follow init; successful initialization isn't required.

If user information updates occur before initialization, they might fail. Consider updating just before opening the page.


# Does AIHelp Have Non-AndroidX Versions?

While AIHelp Android SDK is AndroidX-based, two Support version AAR packages are available:

Support versions are not published to Gradle and require manual AAR integration with these dependencies:

implementation 'com.android.support:support-v4:28.0.0' 
implementation 'com.android.support:appcompat-v7:28.0.0' 
implementation 'com.android.support:design:28.0.0' 
implementation 'com.android.support:recyclerview-v7:28.0.0' 
implementation 'com.android.support:viewpager:28.0.0' 
implementation 'com.android.support:swiperefreshlayout:28.0.0' 
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
Last Updated: 7/27/2026, 6:43:02 AM