LocalServiceBinding.java

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

--



LocalServiceBinding.java

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


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

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




--


Sponsored Links


LocalServiceBinding.java

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
indefinitely.





--



LocalServiceBinding.java

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


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

bye.






--



Other Threads

1. MS Exchange API

Hello All,

I am looking to make an application in which I have to read Email's
from MS Exchange server. I tried to search on API's provided by
Android 2.2 to do so but no luck yet. Is it possible to do so. Is
android gave open APIs to read and reply email through MS exchange. As
of now I am not very much worried about security and administrator
policy, right now my other module of app is in pilot mode with few
users. MS exchange read and reply can be a big boost to the feature
list.

Thanks in advance.


-- 

2. Viewing device data using DDMS

I have just started testing my application on a real device.  Why
can't I see my application data on the device using DDMS like I can on
the emulator?

Thanks

-- 

3. Google Voice SMS Intent Bug

4. HTC Wildfire Home Screen Widgets issue?

5. Method called after release()

6. How to make children of TableRow selectable

7. AutoCompleteTextView performance