xamarin - No phone state event received when ending second call in Android -


i registered phone_state listener in order detect when call started , ended user. in case anyone's wondering, i'm doing strictly fun , learning, there's no privacy concerns.

anyway, noticed problem when experimenting telnet , emulator. in specific scenario when 1 call on hold , second call (the active one) ended, listener receives no event. expecting @ least receive offhook when first call activated again, if not both idle + offhook. there's nothing whatsoever.

on related note, noticed there no phone state event defined putting call on hold, seems bit strange me, too.

of course, android log entries correctly reflect these events. question is, how can reliably detect them in code? should monitor log (not sure if that's possible) instead of relying on phone state listeners?

i'm testing on api 15 on emulator, via xamarin studio, code c# + xamarin.android on mono, not java directly. may behavior bug or omission in 1 of layers, it's more i'm missing obvious.

fwiw, haven't tested code on real device yet. i'm aware hardware can behave bit differently see in emulator.

any appreciated!

yes that's problem. it's hard detect when there more 1 call:

the first call can detected idle offhook or ringing offhook i.e. dialed or incoming. now, when phone goes offhook ringing know second call incoming. if dial second call, offhook offhook, hence can't detected here. (you can listen dial broadcast though). if second call rejected ringing offhook confusing picking call.

imho 3 states not enough track multiple calls, that's api supports time being.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -