I am trying to make a chat window as in Whatsapp. At this point I am able to send chat message, image, audio, video. But I'm facing problem in downloading and uploading the Multimedia files. I'm using listview with custom adapter.
Suppose, My media is downloading, and keyboard popped up or I scroll up or down, then downloading stops. Multimedia is downloading in asynctask. My thinking is every time i scroll or keyboard popped up, adapter get refreshed, that's why downloading stops.
Now, My question is:
1- How whatsapp is doing this same scenario? Because It's downloading is not attached with activity. Even if we switch from activity, downloading still continues.
2- My adapter refreshed, that's why downloading stops. So, How would I make my adapter to not refresh the downloading part?
3- Or, Is there any other option better than list and adapter to achieve this scenario?
Thanks is advance.