Android Question Vr languange settings

hookshy

Well-Known Member
Licensed User
Longtime User
My app is using voice recognition setting the language using vr.language will not help me much because I have added international support meaning that a user can use app menu in a more familiar language and use his native voice imput setting.

For example if I set the language from app to spanish and the user needs to use voice recognition in portuguese it is not possible unless I give him options to do it ... this might create a confusion between the menu language and voice recognition language ..

I do prefer letting the user set his device voice input ...

For this particular issue I need to redirect him exactly on the page with voice input settings

Q: is there a defined intent for this voice input settings ?

I did try the bellow code but yet none is going right to that input page where the user will set the voice imput language

B4X:
Dim DoAction As Intent
'DoAction.Initialize("com.android.settings.TTS_SETTINGS", "")
DoAction.Initialize("com.android.settings.VOICE_INPUT_OUTPUT_SETTINGS", "")

StartActivity(DoAction)

Thank you
 

hookshy

Well-Known Member
Licensed User
Longtime User
the code works only on adroid 2.3.6 , other versions tested 4.0 rises an error god know what other errors will come out on other devices !
so this code is not helping me much ...or I have to change the intent

Ploblem was that I do want to redirect user to voice input settings and let user change voice language at will.
If you could help me I will appreciate.

B4X:
Dim DoAction As Intent
DoAction.Initialize("com.android.settings.VOICE_INPUT_OUTPUT_SETTINGS", "")
StartActivity(DoAction)


found new code but I do not have any andorid 4.1, 4.3, 4.4 to test it

B4X:
try {
final Intent vsInt = new Intent(Intent.ACTION_MAIN);
vsInt.setComponent(new ComponentName("com.google.android.voicesearch",
                            "com.google.android.voicesearch.VoiceSearchPreferences"));
vsInt.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ctx.startActivity(vsInt);

} catch (final Exception e) {

try {
final Intent vsjInt = new Intent(Intent.ACTION_MAIN);
vsjInt.setComponent(new ComponentName("com.google.android.googlequicksearchbox", "com.google.android.voicesearch.VoiceSearchPreferences"));
vsjInt.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ctx.startActivity(vsjInt);

} catch (final Exception e1) {
e1.printStackTrace();
}
}
 
Last edited:
Upvote 0
Top