Вопрос

I have an android app and I would like to implement the search function.

This function shuld access the live server and request all the data containing the searched word.

The problem is that the database is pretty huge and instead of waiting to get all the response an once (very slow), I would like to show results as soon they are availible.

for example, the user is looking for "hello" and in my database I have 10 Strings with hello:

hello1 hello2 hello3 hello4 hello2 hello6 hello7 hello8 hello9 hello10

Instead of waiting all the hello's, i would like to show first hello1, then the hello2 will apear etc.

Do you have an ide how this could be done. Actually, I am using soap requests fo the client-server communication.

Thank you.

Это было полезно?

Решение

Ana I think you can try using a content provider. Create a service which will pull the data from the live server and update the table. Start querying the table after some delay and keep on updating the results as and when user starts scrolling. Just a thought never tried though!!!.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top