I'm building the search in an application and need to have a way of putting the suggestions which I get from my server as a JSON-array into the list of suggestions which is displayed below the Quick Search Box.
Is there an easy way to have the quick search box read such resources?
Currently I am trying to use a ContentProvider, but the interface methods clearly indicate one is supposed to be querying a database to get the suggestions. I guess using a ContentProvider is the correct way if you are searching the data which is stored inside the application. I am not so sure however, that it is the right way if you need to query a network resource.
It makes no sense for me to save the suggestions I get from the network to a local database, as the suggestions and their hit rate will vary from time to time.
Anyone had this issue? Or can point me in the direction of a similar question? I could not find questions here on stack that mentioned network suggestions.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…