Issue Programmatically Adding Word for Word Prediction
Asked Answered
K

1

8

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

Kolnos answered 27/7, 2015 at 17:56 Comment(1)
Hello you should see below link is the source code for custom keyboard hope this will help in getting your desired result : github.com/AnySoftKeyboard/AnySoftKeyboardHives
Y
7

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).

Yenyenisei answered 30/7, 2015 at 8:55 Comment(1)
Sent an email to swift keyboard for what needs to be done but no response yet..!!Kolnos

© 2022 - 2024 — McMap. All rights reserved.