Spell Checker Settings Intent Android
In Android, I can launch the Keyboard & Input Settings dialog using the ACTION_INPUT_METHOD_SETTINGS intent: getPresenter().startActivity(new Intent(Settings.ACTION_INPUT_METHO
Solution 1:
Here you go:
ComponentNamecomponentToLaunch=newComponentName("com.android.settings",
"com.android.settings.Settings$SpellCheckersSettingsActivity");
Intentintent=newIntent();
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(componentToLaunch);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
this.startActivity(intent);
} catch (ActivityNotFoundException e) {
//TODO
}
You can find out the names of other Activities by starting the Activity and lookup the Intent used in Logcat. The output for me was:
I/ActivityManager( 589): START u0 {act=android.intent.action.MAIN cmp=com.android.settings/.Settings$SpellCheckersSettingsActivity} from pid 13084
Solution 2:
Yes, It is Possible..:)
Intentintent=newIntent();
intent.setComponent(newComponentName("com.android.settings","com.android.settings.Settings$SpellCheckersSettingsActivity"));
startActivityForResult(intent);
We create an explicit intent, and we have to launch the com.android.settings.Settings$SpellCheckersSettingsActivity component. For Future Reference, You can use LogCat in eclipse to find whatever package or component you are trying to launch. Just look at the ActivityManager's Starting activity messages and you will see the package and component name of any Activity.
Post a Comment for "Spell Checker Settings Intent Android"