locked
[UWP] VOIP App and app services RRS feed

  • Question

  • I've studied example on github, but one thing is not clear to me. Why do they use app service? I'm working on one voip app, and i'm not sure, if I have to create app service. I didn't find any explanation. Poor documentation.

    Thanks

    Wednesday, May 25, 2016 11:26 AM

Answers

  • Hi JP_Developer,

    >>"Why do they use app service?"

    AppServiceConnection is indeed bi-directional. In terms of lifetime an app service can run as long as the client keeps the connection open. For example, in cases where the client is an app the user is currently looking at you can safely assume that the app service will stay running and respond to events until the user turns off the screen or heads to another app. When that happens Windows will usually come along and suspend the foreground app and terminate any app services it might have sponsored. When your app comes out of suspension it can simply reopen an app service connection to the app service and Windows will start it running again.

    For more information, please check this thread: VoIP example for new Universal Windows Platform (UWP) - how to dispatch events?

    >>"if I have to create app service. I didn't find any explanation. Poor documentation."

    There is a sample about "App services sample" which you could refer to. This sample demonstrates how an app can provide a service that other apps can consume. Windows.ApplicationModel.AppServices namespace. Some of the classes you might want to review in more detail are the AppServiceConnection class, which you use to open a connection to an app service and send messages to it, and the AppServiceTriggerDetails class, which an app service can use to receive and respond to messages.

    Additionally, you could refer to Create and consume an app service. In this article, you could learn how to write a Universal Windows Platform (UWP) app that can provide services to other UWP apps, and how to consume those services.

    Besides, you could check this video and article about the AppService:

    https://channel9.msdn.com/Shows/Inside-Windows-Platform/Exposing-and-Calling-App-Services-from-your-UWP-app http://www.shenchauhan.com/blog/2015/9/15/building-a-data-economy-with-uwp-and-app-services

    Best Regards,

    Leon Guang

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Krunal Parekh Monday, May 30, 2016 3:35 AM
    • Marked as answer by Krunal Parekh Tuesday, June 7, 2016 9:57 AM
    Friday, May 27, 2016 2:14 AM

All replies

  • Hi JP_Developer,

    >>"Why do they use app service?"

    AppServiceConnection is indeed bi-directional. In terms of lifetime an app service can run as long as the client keeps the connection open. For example, in cases where the client is an app the user is currently looking at you can safely assume that the app service will stay running and respond to events until the user turns off the screen or heads to another app. When that happens Windows will usually come along and suspend the foreground app and terminate any app services it might have sponsored. When your app comes out of suspension it can simply reopen an app service connection to the app service and Windows will start it running again.

    For more information, please check this thread: VoIP example for new Universal Windows Platform (UWP) - how to dispatch events?

    >>"if I have to create app service. I didn't find any explanation. Poor documentation."

    There is a sample about "App services sample" which you could refer to. This sample demonstrates how an app can provide a service that other apps can consume. Windows.ApplicationModel.AppServices namespace. Some of the classes you might want to review in more detail are the AppServiceConnection class, which you use to open a connection to an app service and send messages to it, and the AppServiceTriggerDetails class, which an app service can use to receive and respond to messages.

    Additionally, you could refer to Create and consume an app service. In this article, you could learn how to write a Universal Windows Platform (UWP) app that can provide services to other UWP apps, and how to consume those services.

    Besides, you could check this video and article about the AppService:

    https://channel9.msdn.com/Shows/Inside-Windows-Platform/Exposing-and-Calling-App-Services-from-your-UWP-app http://www.shenchauhan.com/blog/2015/9/15/building-a-data-economy-with-uwp-and-app-services

    Best Regards,

    Leon Guang

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Krunal Parekh Monday, May 30, 2016 3:35 AM
    • Marked as answer by Krunal Parekh Tuesday, June 7, 2016 9:57 AM
    Friday, May 27, 2016 2:14 AM
  • But for what is App service in VOIP app? Do I really need it, when I'm implementing such app? 
    Wednesday, June 8, 2016 9:51 AM