Bungles
Bungles

Reputation: 2257

Why is my Android activity's ConfigChanged handler not being called for system language changes?

My game is based on NativeActivity and registers for these config changes in AndroidManifest.xml

android:configChanges="locale">

I've implemented config changes in my C++ command handler like this.

case APP_CMD_CONFIG_CHANGED:
{
    char language[3];
    language[2] = '\0';
    AConfiguration_getLanguage(app->config, language);
    Dprintf("APP_CMD_CONFIG_CHANGED: %s\n", language);
} break;

On a Samsung phone I follow these steps.

  1. Launch my game
  2. Background my game
  3. Open Settings app
  4. Go to General Management -> Language
  5. Change language
  6. Go to task list and choose my game
  7. My game comes back to the foreground

At no point in the above process did I receive a APP_CMD_CONFIG_CHANGED command. Is my expectation correct that I should receive one? If so then what is wrong with my implementation?

Upvotes: 0

Views: 23

Answers (0)

Related Questions