I have somehow implemented incremental search in android using AsyncTask. In incremental search an API is called for each character entered in edit text to get suggestions from server. For example,
User types a -> API is called.
User types ab -> API is called.
User types abc -> API is called.
This makes three API calls for a, ab and abc respectively. If a user is still typing then all the previous requests (e.g. requests of a and ab) will be cancelled and the last request (abc) will be served only to avoid delays.
Now I want to implement this using Volley library for better performance. Could anybody help me how can I achieve this functionality using volley specially the mechanism of cancelling all the previous request and serve the last request only to get suggestions from server.
NOTE: I couldn't find regarding this that's why posting it here. Please do guide me because I am new to android and really in need of answer.