UWP Suspending的意外时间调用了一种方法

时间:2019-02-06 03:29:17

标签: c# .net uwp voip windows-10-universal

在UWP应用程序的SendMessageAsync上调用AppServiceConnection的{​​{1}}时引起以下错误

  

System.Runtime.InteropServices.COMException:'在以下位置调用了一个方法   意外的时间”

我只是想在挂起时结束VOIP通话。

1 个答案:

答案 0 :(得分:0)

在AppServiceConnection的VOIP端,侦听ServiceClosed事件,该事件指示托管AppService的前台应用程序消失了。至此,从那里结束VOIP呼叫。