I want to create a content provider that will bring results from a web server. Its like I send some post parameters to my web server and it returns me with some JSON response which I must parse and show it in the Quick Search Box of android.
I already looked into SearchableDictionary but they don't seem to be connecting to a server to get results. I searched over the web but no proper examples anywhere.
How can I do it?
ContentProviders are not meant to be asyncronous sources of data. In such a situation, you'll need to create a
SyncAdapter
which keeps a local database in sync with a remote datastore and expose data from this local database.ContentResolver
s integrate well withSyncAdapter
s to provide for this.Read point 4 from 'Before you start building' on http://developer.android.com/guide/topics/providers/content-provider-creating.html#DataStorage