I’m trying to use searchStreamAsync with a ApiCallback callback and it never calls onSuccess.
I see a bunch of onDownloadProgress like:
onDownloadProgress bytesRead:18 contentLength:-1 done:false
onDownloadProgress bytesRead:26 contentLength:-1 done:false
onDownloadProgress bytesRead:367 contentLength:-1 done:false
Any ideas?
Is it correct to say that the non-async version searchStream method is working fine for you?
Regarding the ApiCallback never calls onSuccess, my guess is that the Twitter API is still streaming the data (search result) to the client and that’s why the response (in the client-side) never reaches the “onSuccess” stage and onDownloadProgress shows more data received in the client side.
Yes, I switched to using the non-async version of apiInstance.tweets().searchStream along with BufferedReader/readline where each line represents a FilteredStreamingTweet.
(Similar to Twitter-API-v2-sample-code/FilteredStreamDemo.java at 54b161835fc7fb7c16e358f1c46ec12b4c0ec418 · twitterdev/Twitter-API-v2-sample-code · GitHub)
I’m getting streamed tweets ok like that. I have not found any example usage of the async call anywhere.