Skip to content

FAQ

Q: What should I do if SDK initialization fails?

A: Check the following:

  • Verify the appKey is correct
  • Check network connectivity
  • Confirm the target language code is valid
  • Review the error message in the initialization callback

Q: getPageString returns an empty string?

A: Possible causes:

  • The string ID does not exist or is misspelled
  • Translation files for the target language have not been published
  • SDK initialization has not completed yet
  • Use the method with a default value to avoid displaying empty content

Q: Language switch doesn't take effect?

A: Language switching is asynchronous. Make sure:

  • Wait for the initialization callback to succeed before using the new language
  • Verify the language code is correct
  • Confirm translation files for the target language have been published

Q: LoxiBot floating button doesn't appear?

A: Since SDK 1.2.8+, the floating button is no longer displayed automatically. Integrators must call:

  • LoxilyLocalize.showAgentBubble() to show the floating button
  • LoxilyLocalize.hideAgentBubble() to hide the floating button
  • Or call LoxilyLocalize.reviewCurrentScreen() to trigger a review programmatically

Q: What's the difference between passing string_ids and not passing them in reviewCurrentScreen?

A: Without string_ids, the AI uses OCR to recognize text in the screenshot and match string_ids, which may result in incorrect matches when different string_ids share the same display text. With string_ids, the SDK queries the backend for each string_id's source text and all language translations, providing the AI with precise mapping data for more accurate analysis. We recommend passing string_ids.

Q: What about black screenshots in game engines (Unity)?

A: Unity uses its own Surface for rendering (OpenGL ES/Vulkan), so traditional View.draw() screenshots will be black. SDK 1.3.3+ recommends using external screenshot mode:

java
// Unity captures screenshot via RenderTexture, gets byte[]
LoxilyLocalize.reviewCurrentScreen(stringIds, imageBytes);

This approach does not rely on Android system screenshot APIs and does not require FOREGROUND_SERVICE_MEDIA_PROJECTION permission, avoiding Google Play review issues.

Q: suggestTranslation is not responding?

A: Check the following prerequisites:

  • SDK initialization is complete (init() callback returned success)
  • userId has been set via updateUserInfo() (SDK will log a warning and skip if not set)
  • stringIds is not an empty array
  • There is a foreground Activity available (SDK needs to open the co-creation UI on top of an Activity)

Q: App crashes when tapping the bubble / triggering screenshot review (TransactionTooLargeException)?

A: This issue has been fixed in SDK 1.4.1. In previous versions, the Base64-encoded screenshot data was passed via Intent extras, which could exceed Android's Binder transaction limit (~500KB) on high-resolution devices, causing a TransactionTooLargeException. The new version transfers screenshot data through a temporary file, completely avoiding this limitation. Please upgrade to the latest version.

Q: How to handle dependency conflicts?

A: The SDK uses recyclerView, material, okhttp, gson, and glide. If you encounter dependency conflicts, exclude the conflicting dependencies in build.gradle:

groovy
dependencies {
  implementation('com.loxily:android-localize-sdk:1.3.4') {
    exclude group: 'com.squareup.okhttp3', module: 'okhttp'
    // Exclude other conflicting dependencies
  }
}

Q: Which Android versions does the SDK support?

A: The SDK supports Android API Level 21 (Android 5.0) and above.