Sorry, didn't quite read far enough. So you're using a service but it still "crashes". If it really crashes, then the system log should show a stack trace that gives you more information about the crash. Have a look there in that case. If by "crashes" you mean "stops playing", then I'm guessing your service was stopped because your activity went away and you used bindService() instead of startService().
On Tue, May 5, 2009 at 1:40 PM, Marco Nelissen <[email protected]> wrote: > If you want to reliably do something in the background, you need to use a > service. Having a static reference to some object is not enough. > > > > On Mon, May 4, 2009 at 3:16 PM, [email protected] < > [email protected]> wrote: > >> >> I've successfully played shoutcast mp3 streams while the application >> is hidden (no activity showing), simply by keeping a static pointer to >> the playing thread (http://developer.android.com/guide/appendix/faq/ >> framework.html#3<http://developer.android.com/guide/appendix/faq/%0Aframework.html#3>). >> After updating to 1.5 it crashes almost instantly >> after destroying the activity, and brings AudioTrack to unusable >> state. There's been a change in AudioTrack.cpp since 1.1, claiming to >> fix the "// FIXME: Wake up audioflinger" line in obtainBuffer(..). >> That made me put the play thread into a Service to try if it works, >> but it holds a little longer and crashes the same way. In 1.1 it >> worked nicely, for hours, under heavy loaded cpu, memory and network. >> Can anybody help figuring that out? >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

