This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

Hi,

I want to change the device Language to test the varius version of the app by selecting different languages.

the easiest way would be inserting the country and language in the capabilities

capabilities.setCapability(“locale”, “en_US”);
capabilities.setCapability(“language”, “en”);

but it is not supported in my Android device (it can’t open the settings)

another solution is the select the language wir adb

adb shell am broadcast -a io.appium.settings.locale --es lang de --es country DE

I need help to write it in a adb wrapper in JAVA.
best regards

  • created

    Feb '19
  • last reply

    Feb '19
  • 1

    reply

  • 138

    views

  • 2

    users

  • 2

    links

@ghasal look at -> http://appium.io/docs/en/commands/mobile-command/1 -> mobile:shell:
note it is required - http://appium.io/docs/en/writing-running-appium/server-args/index.html#server-flags -> --relaxed-security

example:

List<String> arguments = Arrays.asList("-a", "io.appium.settings.locale", "--es lang", "de", "--es country",  "DE");
Map<String, Object> command = ImmutableMap.of("am", "broadcast", "args", arguments);
String outputText = (String) driver.executeScript("mobile:shell", command);