Couldn't you just ignore any onCallStateChanged() calls within the first X seconds of the device starting up?
BOOT_COMPLETED events seem to fire before the user even has full access to the UI, and certainly well before mobile network connectivity has been established. Even moreso if the user has their SIM protected with a PIN. Chris On Nov 4, 4:32 pm, Tabibito <[email protected]> wrote: > What I mean is that I start the service when I receive a > "BOOT_COMPLETED" message from the system. Immediately upon starting > my service, onCallStateChanged() is called with a state of "idle". No > calls have come in, I haven't even touched the emulator... I'm > assuming that it's happening because the call state started out as > undefined, and when the system got around to filling it in with > "idle", my service was already listening, and therefore got notified > of the change (this is only a guess - I could be way off on this...). > If I could figure out what it changed FROM, that would be useful. I > could also probably sense this initial anomaly with some sort of > persistent state variable, and the first time onCallStateListener is > called, set the variable and ignore the state change, then every > future calling of onCallStateListener would look at that variable to > see if it was set... but that sounds like a really messy approach for > something that probably has a much cleaner solution. -- 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

