2

I am using DataDroid (http://www.datadroidlib.com/) in my android app to execute Rest API. Suppose I have a queue of requests like this:

  1. Call getInbox
  2. Call getFeedbackFilterByFeedbackId
  3. Call getInbox
  4. Call getFeedbackFilterByFeedbackId
  5. Call getInbox
  6. Call getFeedbackFilterByFeedbackId
  7. Call getInbox
  8. Call getFeedbackFilterByFeedbackId
  9. Call getInbox
  10. Call getFeedbackFilterByFeedbackId

At anytime, I want to cancel/remove a request from the queue (ie. request 5). Currently, DataDroid does not support this feature (http://www.datadroidlib.com/2013/01/datadroid-2-1-released#comment-277). FoxyKeep said that they will support this feature in the future. But I can't wait, I think I should implement this feature by my self. I just want to ask is there anyone who already customize DataDroid to implement this feature? If yes, please share me your solution. Any recommendation are welcome.

Thanks

Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165

1 Answers1

1

Good part of DataDroid is that you can use whatever library for the http request!

What I'm suggesting is we need to remove http request part and plug the brand new Volley lib such that you can have control over request queue (cancel/remove a request from the queue). so what is needed is Volley Integration to the DataDroid as http request client , I'm sure this is going to happen in few days have a look at this Conversions of awesome lib makers Nicolas Klein(DataDroid) and Ficus Kirkpatrick(Volley) , Nicolas mention that "Seems like I'll add a new sample to DataDroid using Volley then :)" it's good news! So all the async code will removed by implementing Volley ! In the mean time try to use Volley for your request queue problem!

Update: DataDroid with Volley not available, we have contribute for make this happen very soon! !!

We really need this Volley on DataDroid:

Volley DataDroid

Join the Conversion on G+

LOG_TAG
  • 19,894
  • 12
  • 72
  • 105
  • @Codeversed I asked Nicolas Klein(DataDroid) long time ago!! He said it's in TO DO list! he is busy I guess! We have to start forking by replacing all n/w calls to super power Volley with Okhttp! – LOG_TAG Dec 04 '13 at 06:48