[UWP] [C#] AppMemoryUsageLimitChanging事件未在后台触发 [英] [UWP][C#]AppMemoryUsageLimitChanging event not firing in background

查看:96
本文介绍了[UWP] [C#] AppMemoryUsageLimitChanging事件未在后台触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!



我使用本文中的代码https://docs.microsoft.com/en-us/windows/uwp/launch- resume / reduce-memory-usage。

当应用程序运行事件被触发但是当我将应用程序发送到后台时,我的lumia 650事件未被触发(没有附加VS)。我使用hockeyapp客户端跟踪事件(也许它无法在后台显示,但我无法证明)。



所以我需要帮助解释为什么(不)发生。



感谢您的帮助。


解决方案

Mr1Penguin,


>>当应用程序运行事件被触发但当我将应用程序发送到后台时,我的lumia 650事件未被触发(没有附加VS)。


你能告诉我你如何测试 AppMemoryUsageLimitChanging 事件?


在我的测试中,我按照  文档 以及将一些文本写入  AppMemoryUsageLimitChanging   handler,
然后在visual studio外运行应用程序并将应用程序切换到后台。最后,我可以在应用程序的本地文件夹中找到该文件并写入文本。 


祝你好运,


Breeze Liu


Hello!

I use code from this article https://docs.microsoft.com/en-us/windows/uwp/launch-resume/reduce-memory-usage .
When application running event is fired but when I send application to background on my lumia 650 event not fired(without attached VS). I track event using hockeyapp client(maybe it can't show this in background but I can't prove it).

So I need help to figure why it's (not) happening.

Thanks for your help.

解决方案

Hi Mr1Penguin,

>>When application running event is fired but when I send application to background on my lumia 650 event not fired(without attached VS).

Could you tell me how do you test the AppMemoryUsageLimitChanging event?

In my test, I create an app following the document and write some text into a local file in the AppMemoryUsageLimitChanging handler, then running the app outside of the visual studio and switching the app to the background. Lastly I can find the file in the app's local folder and the text is written into. 

Best regards,

Breeze Liu


这篇关于[UWP] [C#] AppMemoryUsageLimitChanging事件未在后台触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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