1

I have to open language selection page in android from application. i am using below code.

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.android.settings","com.android.settings.LanguageSettings");            
startActivity(intent);

But this is calling "language and input page" again i have to click on language tab to go inside and select language, so is there any way to open that language page directly.

Ravi
  • 34,851
  • 21
  • 122
  • 183
AMIT
  • 390
  • 1
  • 4
  • 17

2 Answers2

3

I found this:

startActivityForResult(new Intent(Settings.ACTION_LOCALE_SETTINGS), 0);

This worked for me

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
sean
  • 31
  • 4
  • If you don't need the result, you can just do `startActivity(new Intent(Settings.ACTION_LOCALE_SETTINGS))` – HendraWD Jul 15 '19 at 03:16
1

If language Tab is an activity than you can do by same way as above.

That you can check using following command :

adb shell dumpsys activity

This command show current activity name in activity stack. From this you can find name that you can pass in Intent to directly that start this activity.

Bhagirathsinh Gohil
  • 673
  • 1
  • 9
  • 25
  • yes correct, For that i am getting "com.android.settings.LanguageSettings.SubSettings", so i tried with same , but appplication is crashing, i think becuase there are so many subsettings for that so which 1 has to select. – AMIT Apr 18 '16 at 13:44