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 android-developers@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to