Having the same problem with the PhoneStateListener. Did you manage to keep it alive? Regarding services, this might help: http://groups.google.com/group/android-developers/browse_frm/thread/fa2848e31636af70?hl=en
On Dec 3, 3:21 pm, blau <[email protected]> wrote: > I'm trying to figure out the best way to have a PhoneStateListener > survive as long as possible and be recreated if necessary. > > TelephonyManager telephonyManager = (TelephonyManager) > aContext.getSystemService(Context.TELEPHONY_SERVICE); > telephonyManager.listen(listener, > PhoneStateListener.LISTEN_CALL_STATE); // > > I'm setting that up on BOOT_COMPLETED, and it survives for a while, > but eventually garbage collection kicks in and seems to kill my > listener. > > Setting a service up that just holds a reference would work right? But > what concerns do I need to have about services dieing? > > Anyone have an idea why phone states weren't implemented as a > broadcast intent? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

