Monotouch에서 전화 또는 발신자 서비스의 현재 상태를 읽을 방법이 있습니까? 통화가 활성 또는 전화 아무것도를 설정하지 않은이에 인터넷 검색을 보류 등Monotouch 전화/통화 상태?
에있는 경우 읽을 수있는 방법을 찾기 위해 노력
임.
는 같은 일부 코드를 실행하는 데보고 있었다 : 내 솔루션if(CallIsActive) {
}
else {
}
:
public static class CallHandler
{
private static CTCallCenter ctc;
private static NSSet calls;
public static void StartListening() {
Console.WriteLine ("Callhandler is listening");
ctc = new CTCallCenter();
calls = ctc.CurrentCalls;
ctc.CallEventHandler = new CTCallEventHandler (delegate(CTCall inCTcall) {
calls = ctc.CurrentCalls;
});
}
public static uint CallCount {
get {
return (calls != null) ? calls.Count : 0;
}
}
public static string GetCallState(int CallID) {
CTCall[] callArr = calls.ToArray<CTCall>();
CTCall call = callArr[CallID];
return call.CallState;
}
}
실행 CallHandler.CallCount 등 현재 callcount 및 GetCallState (0) 첫번째 요구를 얻기 위해
Anders, StackOverflow에서 솔루션을 찾는 다른 사람들을 위해 자신의 게시물에 자신의 질문에 대답 할 수 있습니까? –
좋아, 내가 일하러 돌아올 때 내 솔루션을 게시! – Anders