Search code examples
c#windows-phonescheduled-taskssipvoip

How to Launch Windows Phone Foreground App from VoipHttpIncomingCallTask?


I have an App that I have written in C# Windows Phone 8.0. I have implemented a VoipHttpIncomingCallTask called ScheduledAgentImpl : ScheduledTaskAgent. In this class the protected override void OnInvoke(ScheduledTask task) is called whenever a Push Notification comes in with the Type set to 4, for Incoming Call Notification.

I cannot figure out how to start or launch the Foreground UI App, if it has been Back grounded or Closed completely? I have researched for several hours but haven't come across anything.

Any ideas? Cannot find any answers online thus far??


Solution

  • The best way to do this is to use the Native Chatterbox sample and implement the background handlers it has. These will automatically launch the App to the page you set in CallController.cpp line 390

    CallController::CallController() : callInProgressPageUri(L"/YourAppProject;component/MainMenu/MainMenu.xaml?FromSipPush=true"),

    This will let the App launch after you answer the Sip Notification.