Re: [android-developers] Re: Service to Activity communication with Broadcast Reciever every 1 sec . Is this right approach?

2011-10-11 Thread TreKing
On Tue, Oct 11, 2011 at 3:21 PM, NikolaMKD wrote:

> I have to create AIDL for methods from which I'll have access to
> the service. If I have each player feature(play, next, previous)
> I'm starting new service with startService(), when onBind() the object that
> will be returned to be used to control the service will I still have the
> access to the service whenever another call to startService is made?
>

I didn't follow all that, but I think so :-)

Will START_STICKY keep my service running even if the phone is locked or
> activity is not visible to the user anymore?


No, START_STICKY, I believe, asks the system to restart your Service if it
gets killed before it finished what it was doing.

Note Studio's advice, but be aware that there is nothing you can do to
guarantee your Service will always be running. Code with the assumption that
it will die at some point, because it probably will.

-
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

[android-developers] Re: Service to Activity communication with Broadcast Reciever every 1 sec . Is this right approach?

2011-10-11 Thread Studio LFP
You may want to check out a foreground service if you need a high priority 
service like playing music, etc.

http://developer.android.com/reference/android/app/Service.html#startForeground%28int,%20android.app.Notification%29

This should make it a foreground application and help keep it from being 
destroyed for needed memory.

Steven
Studio LFP
http://www.studio-lfp.com


On Tuesday, October 11, 2011 3:33:53 PM UTC-5, NikolaMKD wrote:
>
> Will START_STICKY keep my service running even if the phone is locked 
> or activity is not visible to the user anymore? 
>
> On Oct 11, 10:21 pm, NikolaMKD  wrote: 
> > I have to create AIDL for methods from which I'll have access to the 
> > service. If I have each player feature(play, next, previous) I'm 
> > starting new service with startService(), when onBind() the object 
> > that will be returned to be used to control the service will I still 
> > have the access to the service whenever another call to startService 
> > is made? 
> > 
> > On Oct 11, 9:20 pm, TreKing  wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > On Tue, Oct 11, 2011 at 1:58 PM, NikolaMKD wrote: 
>
> > 
> > > > 3. Is there any rather better approach than this one? Point me 
> some... 
> > 
> > >http://developer.android.com/reference/android/app/Service.html#Local... 
>
> > 
> > > 
> --- 
> -- 
> > > 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

[android-developers] Re: Service to Activity communication with Broadcast Reciever every 1 sec . Is this right approach?

2011-10-11 Thread NikolaMKD
Will START_STICKY keep my service running even if the phone is locked
or activity is not visible to the user anymore?

On Oct 11, 10:21 pm, NikolaMKD  wrote:
> I have to create AIDL for methods from which I'll have access to the
> service. If I have each player feature(play, next, previous) I'm
> starting new service with startService(), when onBind() the object
> that will be returned to be used to control the service will I still
> have the access to the service whenever another call to startService
> is made?
>
> On Oct 11, 9:20 pm, TreKing  wrote:
>
>
>
>
>
>
>
> > On Tue, Oct 11, 2011 at 1:58 PM, NikolaMKD 
> > wrote:
>
> > > 3. Is there any rather better approach than this one? Point me some...
>
> >http://developer.android.com/reference/android/app/Service.html#Local...
>
> > --- 
> > --
> > 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


[android-developers] Re: Service to Activity communication with Broadcast Reciever every 1 sec . Is this right approach?

2011-10-11 Thread NikolaMKD
I have to create AIDL for methods from which I'll have access to the
service. If I have each player feature(play, next, previous) I'm
starting new service with startService(), when onBind() the object
that will be returned to be used to control the service will I still
have the access to the service whenever another call to startService
is made?

On Oct 11, 9:20 pm, TreKing  wrote:
> On Tue, Oct 11, 2011 at 1:58 PM, NikolaMKD wrote:
>
> > 3. Is there any rather better approach than this one? Point me some...
>
> http://developer.android.com/reference/android/app/Service.html#Local...
>
> --- 
> --
> 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