Hi,
I was testing PhoneStateListener using a simple application that
instantiates a TelephonyManager
& implements PhoneStateListener methods: onCallStateChanged,
onServiceStateChanged (just print out corresponding states).
I noticed if SERVICE_STATE listener is registered first before
CALL_STATE, call states are printed in LogCat (i.e. onStateChanged
is called) when I make calls or hang up (vias Eclipse DDMS Telephone
Actions).
If instead CALL_STATE listener is registered first before
SERVICE_STATE, no call states are printed in LogCat &
onCallStateChanged is not called.
I did not find any doc or report on this issue. What can be
missing ? Anyone also saw this ?
Thanks in advance.
- az9702
##------------------------------------------------------------------------------------------------------------------------------
telephonyManager.listen(listener,
PhoneStateListener.LISTEN_SERVICE_STATE);
telephonyManager.listen(listener,
PhoneStateListener.LISTEN_CALL_STATE);
//06-07 16:01:40.210: INFO/telephony(740): onServiceStateChanged 0
home Android Android 310260
//06-07 16:01:40.220: INFO/telephony(740):
onServiceStateChanged - in_service
//06-07 16:01:40.229: INFO/telephony(740):
onServiceStateChanged - operator Android
//06-07 16:01:40.229: INFO/telephony(740):
onServiceStateChanged - isRoaming false
//06-07 16:01:40.239: INFO/telephony(740): call state - idle
//06-07 16:01:53.949: INFO/telephony(740): call state -
ringing
telephonyManager.listen(listener,
PhoneStateListener.LISTEN_CALL_STATE);
telephonyManager.listen(listener,
PhoneStateListener.LISTEN_SERVICE_STATE);
//06-07 16:05:46.427: INFO/telephony(750): call state - idle
//06-07 16:05:46.427: INFO/telephony(750):
onServiceStateChanged 0 home Android Android 310260
//06-07 16:05:46.427: INFO/telephony(750):
onServiceStateChanged - in_service
//06-07 16:05:46.427: INFO/telephony(750):
onServiceStateChanged - operator Android
//06-07 16:05:46.427: INFO/telephony(750):
onServiceStateChanged - isRoaming false
[No call state on making calls or hang up]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---