by qlimax » Thu, 17 Dec 2009 21:04:04 GMT

Sponsored Links
 Hi guys.

I'm writing an application that use a service to play an audio file

I'm watching the LocalService.java and LocalServiceBinding.java
from the API DEMO

In the api demo, the LocalService.java make a notification in the
status bar, in my case it plays mp3 and make a notification. But that
doesn't matter.

My problem is that when the user press the "Back Button" the service
must stay active.
I want have the same behaviour as  when i press the "Home Button"...

Any help is welcome :D

ps:sorry for my eng



by qlimax » Thu, 17 Dec 2009 22:15:55 GMT

 sorry... maybe solved without binding
but using startService/stopService

----maybe... requires tests :::)))----


Sponsored Links


by G » Thu, 17 Dec 2009 23:03:08 GMT

 Hey I ran into this problem a while back and was pulling my hair out.
The fix is easy (and you're on the right track)

You can still call bindService, you just have to call startService
first. If the service is started via bindService, then it will live
and die with the activity that called it, but if you start it with
startService and THEN bind it with bindService, it should stay alive



by qlimax » Fri, 18 Dec 2009 00:16:43 GMT

 Hi G,
thanks a lot for the explanation.
(souch thigs should be better documented...)



Other Threads

1. spinlock recursion in high speed uart driver

I was looking at High speed UART driver code and wondering how can
another command be enqueued to datamover in datamover irq context?
doesn't that cause spinlock recursion problem. msm_dmov_lock is taken
in datamover irq hander and completion function is called with this
lock held. we are trying to call msm_dmov_enqueue_cmd (again trying to
acquires msm_dmov_lock).
am i missing something here? can somebody clarify this?

unsubscribe: android-kernel+unsubscr...@googlegroups.com

2. MSM 7200 development board

Hi All!

Does anyone know how can I get (buy) a development board for
Qualcomm's MSM 7200 ?

(Sorry for 'off topic'ing)


unsubscribe: android-kernel+unsubscr...@googlegroups.com

3. MSM 7200 development board ?

4. TabHost and New Activities

5. PhoneStateListener GarbageCollection

6. :: BackGround Service..!!Help

7. onContextItemSelected is never called