Add Words to Android's UserDictionary
Posted
by SaulBack
on Stack Overflow
See other posts from Stack Overflow
or by SaulBack
Published on 2010-05-22T16:45:57Z
Indexed on
2010/05/22
16:50 UTC
Read the original article
Hit count: 164
android
I want to add an entire medical dictionary to my android (Moto Droid). I would like to be able to send text messages and have the medical words be in the predictable text.
I've been trying to write a small app that would accomplish this, but everything I try the app crashes on startup. I've never written an app for a mobile platform so that is a first for me. Here is what is not working properly.
public class WordAdd extends Activity {
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
UserDictionary.Words.addWord( this , "newMedicalWord", 1, UserDictionary.Words.LOCALE_TYPE_CURRENT);
}
}
It seems so simple to do, yet I am so stuck. Thanks for any help you can provide.
© Stack Overflow or respective owner