You know, I don't. My apps aren't open source, and I came up with it 
myself, not borrowed from a library.

But it's not rocket science, I'm sure you understand the pattern.

-- K

On Friday, February 20, 2015 at 4:39:32 AM UTC+3, Kristopher Micinski wrote:
>
> 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 <kman...@gmail.com 
> <javascript:>> 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 
>

>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to