[UWP]主机应用关闭时关闭相同的流程应用服务。 [英] [UWP]Same process app service closing when host app closes.

查看:54
本文介绍了[UWP]主机应用关闭时关闭相同的流程应用服务。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用正在提及的流程应用服务  此处。但问题是,一旦主机应用程序关闭,appservice连接
也会关闭。

如果我按照描述创建单独的应用程序服务  这里。这不会导致关闭appservice连接,因为它是在单独的进程中运行的


我需要使用进程内appservice,因为我必须访问主机应用程序的app类的一些方法。那么,即使在主机应用程序关闭后,我是否有任何方式让进程内应用程序服务继续运行。

I am using in process appservice as mentioned here. But the problem is that once the host app is closed, the appservice connection is closed too.
While if I create seperate app service as described here. This does not lead to closing of appservice connection as it is running in separate process.
I need to use in-process appservice as I have to access some methods of app class of host app. So, is there any way that I let the in-process appservice to continue running even after the host app is closed.

推荐答案

嗨Jatin,



当主机应用程序关闭且连接关闭时,您可以在客户端应用程序上重新打开appservice连接。通过这种方式,主机应用程序将被激活并在后台运行而不显示UI。 
$
https://blogs.windows.com/buildingapps/2016/06/07/background-activity-with-the-single-process-model  
$


最好的问候,

David
Hi Jatin,

You could reopen the appservice connection on the client app when the host app is closed and the connection is closed. By this way, the host app will be activated and run in background without showing the UI. 
https://blogs.windows.com/buildingapps/2016/06/07/background-activity-with-the-single-process-model 

Best Regards,
David


这篇关于[UWP]主机应用关闭时关闭相同的流程应用服务。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆