質問

I am developing an Android word game like Scrabble. I need to check if the word a user enters is correct (aka is a String entered by a user equal to an existing word).

All that Android seems to offer is a spell-checking api which provides you with some suggestions based on your input. This just seems silly to me because these suggestions are actual words and there seems to be nothing in the api that is able to check if a word exists in it's dictionary.

I understood that there are some other web based solutions for my problem but I can't assume these web-based solutions will work forever and that users have a stable network connection. Also, my game is time based so the only proper solution would be a local one.

So, (how) can I validate a word (String) locally on Android?

inb4 it can't be done properly and wordnik is the best solution for me

役に立ちましたか?

解決

Load your dictionary into SQLite and use a query to determine if it's valid.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top