答案 0 :(得分:2)
以下内容可在Android 2.3.3源代码git中找到:
501 <activity android:name="VoiceInputOutputSettings"
502 android:label="@string/voice_input_output_settings">
503 <intent-filter>
504 <action android:name="android.intent.action.MAIN" />
505 <action android:name="com.android.settings.VOICE_INPUT_OUTPUT_SETTINGS" />
506 <category android:name="android.intent.category.DEFAULT" />
507 </intent-filter>
508 </activity>
509
510 <activity android:name="TextToSpeechSettings" android:label="@string/tts_settings">
511 <intent-filter>
512 <action android:name="android.intent.action.MAIN" />
513 <action android:name="com.android.settings.TTS_SETTINGS" />
514 <category android:name="android.intent.category.DEFAULT" />
515 </intent-filter>
516 </activity>
这两项行动可能没有官方常数。但您可以尝试“com.android.settings.VOICE_INPUT_OUTPUT_SETTINGS”和“com.android.settings.TTS_SETTINGS”,它适用于我的Nexus S.
答案 1 :(得分:2)
这是我使用Android 2.2
final Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(ComponentName.unflattenFromString("com.android.settings/.TextToSpeechSettings"));
intent.addCategory(Intent.CATEGORY_LAUNCHER );
startActivity(intent);
另请参阅:how to show up the settings for text to speech in my app?
答案 2 :(得分:1)
此代码适用于显示语音输入/输出设置页面。希望这对你有用。
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.android.settings","com.android.settings.VoiceInputOutputSettings"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);