Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue Programmatically Adding Word for Word Prediction

I am using UserDictionary.Words class's addWord function to add Words to Dictionary so that they can show up in Text prediction. The Words do exist in the dictionary with APP_ID=0 and available for default android keyboard. However I am using Swift keyboard and it is not considering those words for Prediction.

I am using this TUTORIAL

 UserDictionary.Words.addWord(this, "ThisIsSomeWordIwantForPrediction", 250, null, Locale.getDefault());

My question is how can I add words such that they are available for prediction for all keyboards

like image 271
Quamber Ali Avatar asked Jul 27 '15 17:07

Quamber Ali


1 Answers

You are doing the right thing to make the words available, but as you have found, not all keyboards are reading from the system dictionary content provider.

That's a question you need to address to Swiftkey, as to why their keyboard does not use the system provided word list.

(Similarly, not all web browser apps make use of the system provided bookmark storage, and messaging apps like whatsapp provide their own storage solution, rather than making use of the inbuilt SMS storage provider).

like image 150
zmarties Avatar answered Oct 06 '22 18:10

zmarties