拼写检查设置意图Android

Cod*_*gue 4 android android-intent

在Android中,我可以使用intent 启动" 键盘和输入设置"对话框ACTION_INPUT_METHOD_SETTINGS:

getPresenter().startActivity(new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS));
Run Code Online (Sandbox Code Playgroud)

问题: 如何打开"拼写检查器"设置对话框(在Jelly Bean +中可用),以便用户可以启用我的服务?

示例: 我可以从语言和输入设置中获取它: 语言和输入设置

但是我想直接将用户带到这个屏幕: 拼写检查设置

For*_*rce 9

干得好:

ComponentName componentToLaunch = new ComponentName("com.android.settings", 
        "com.android.settings.Settings$SpellCheckersSettingsActivity");

        Intent intent = new Intent();
        intent.addCategory(Intent.CATEGORY_LAUNCHER);
        intent.setComponent(componentToLaunch);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

        try {
            this.startActivity(intent);
        } catch (ActivityNotFoundException e) {
            //TODO
        }
Run Code Online (Sandbox Code Playgroud)

您可以通过启动Activity并查找Logcat中使用的Intent来查找其他活动的名称.我的输出是:

I/ActivityManager(  589): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.Settings$SpellCheckersSettingsActivity} from pid 13084
Run Code Online (Sandbox Code Playgroud)