Content Provider To Get Userdicationary Returns Nothing
Solution 1:
I have similar problem on my Samsung devices, it seems that Samsung (for some reason) has overridden the user dictionary... I installed google keyboard from the play store which has an option for adding words to the dictionary, when opening the user dictionary, I find it empty and pressing add words yield no response at all, except for the system sound :).
If you are like me, trying to experiment with content providers and found that user dictionary is an easy target, it is just as simple to switch to user contacts.
First change permissions so that you have access to Contacts instead
<uses-permissionandroid:name="android.permission.READ_CONTACTS"/>
Then change your content resolver as follows:
Cursorcursor= resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);
int wordColumnIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);
This got me going through the rest of experimentation, or exercise..
Solution 2:
First we need to check weather our personal dictionary is empty or not.
I used this to get the results:
In your phone Find and tap Settings > Language & input > Personal dictionary > Add or the + (plus) icon. And add a word. Now try running the program or app.
The dictionary was empty, when i added some values, it returned results.
For different versions of android, see this page.
I used the above link for sony.
Similarly you can find how to add dictionary for other mobiles.
Post a Comment for "Content Provider To Get Userdicationary Returns Nothing"