I agree, that sounds like a useful pattern.  I *think* that's
relatively close to how Volley is implemented (though I haven't read
the implementation fully), too.

Do you have any pointers to open sourced code that would provide an
example of such a behavior?  If not, no big deal: I can certainly
write one myself, and am not asking you to open-source code from your
codebase.

Kris


On Thu, Feb 19, 2015 at 4:17 PM, Kostya Vasilyev <[email protected]> wrote:
> A service "turned inside out"
>
> A "mediator" class that manages a pool of threads, submits / cancels /
> executes task objects, manages the wake lock (based on having tasks).
>
> And a service whose only responsibility is to do startForeground /
> stopForeground when it's told to.
>
> All in the same process.
>
> This way I don't have to bind to a service (which is asynchronous) and it's
> easier to manage state in the UI, to indicate to the user what the app is
> doing, and to queue up tasks when necessary.
>
> -- K
>
>
> 2015-02-19 23:30 GMT+03:00 Kristopher Micinski <[email protected]>:
>>
>> Right, that's a good point I did not mention.
>>
>> I'm interested in knowing what percentage of apps use a framework like
>> this rather than facilities purely within the "vanilla" Android
>> framework.
>>
>> I can do some rough calculations in a while by grabbing a bunch of
>> apps and running some analysis on them,
>>
>> Kris
>>
>>
>> On Thu, Feb 19, 2015 at 3:13 PM, TreKing <[email protected]> wrote:
>> >
>> > On Thu, Feb 19, 2015 at 2:03 PM, Kristopher Micinski
>> > <[email protected]> wrote:
>> >>
>> >> I was
>> >> wondering if there were any other patterns that app developers used
>> >> that I hadn't thought about,
>> >
>> >
>> > Use a library like Volley or Retrofit.
>> >
>> >
>> > -------------------------------------------------------------------------------------------------
>> > TreKing - Chicago transit tracking app for Android-powered devices
>> >
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to