Tuesday, October 11, 2011

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

On Tue, Oct 11, 2011 at 3:21 PM, NikolaMKD <nikola.despotoski@gmail.com> 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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment