[xamarin form]]Well in native android you have the telephony manager t…
페이지 정보
작성자 sbLAB 댓글 0건 조회 2,002회 작성일 19-10-31 18:35본문
Well in native android you have the telephony manager to check what is the state of your device:
It has three states:
- Idle: when it's idle there is no call
- Offhook: when Off-hook it is in call
Ringing: when Ringing
var telephonyManagerService = (TelephonyManager)Xamarin.Forms.Forms.Context.GetSystemService(TelephonyService); var getCurrentState = telephonyManagerService?.CallState; switch (getCurrentState) { case CallState.Idle: //No call break; case CallState.Ringing: //Ringing break; case CallState.Offhook: //On call break; default: break; }
댓글목록
등록된 댓글이 없습니다.