Static methods makes sense if I have to access the abstracted logic in only 
my application, but if I have to expose this logic to be used by any other 
activity of different application then bound service approach will help 
isn't it.  Please feel free to share you opinion it will help to get my 
understanding better.

Thanks,
Ji

On Sunday, January 4, 2015 2:57:07 PM UTC-5, TreKing wrote:
>
>
> On Sun, Jan 4, 2015 at 1:34 PM, Ji <jiten...@gmail.com <javascript:>> 
> wrote:
>
>> The reason I am doing so is I need to execute a common piece of logic 
>> when some action is taken from components in first activity or any other 
>> components from other activities. So based on actions from components from 
>> multiple activities I need to route them via common logic, Hence I thought 
>> to achieve it via bound service where all the activities that need this 
>> logic can bind to the service and pass necessary intents to its api method. 
>> Let me know if it makes sense.
>
>
> I don't think that makes sense. I understand wanting to abstract out 
> common logic - that's fine - but doing so in a Service is overkill, IMO, 
> based on what you've shared so far. If all your doing is passing some class 
> some data (an Intent) and it's determining what Activity to start based on 
> that data, it seems like you could accomplish the same thing through some 
> static methods.
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/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 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