问题标签 [tombstoning]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - 当 WP7 中的 FG 和 BG 同步发生冲突时会发生什么?
我有一个应用程序,它有一个 BG 模块,它强制每 4 分钟运行一次以进行测试,它工作正常。一旦我启动应用程序(首次启动)并在服务器上注册,就会显示内容并退出应用程序。应用程序进入 Application_Closing() 状态。我等了一会儿(说大约 15 分钟)并尝试启动应用程序,有时会发生这样的情况,在 MainPage() 构造函数执行后,应用程序被停用,在调试时,从日志中我观察到应用程序运行到 Application_Deactivated() 状态。基本上,应用程序启动,它仍然显示启动画面(自定义)并且它突然终止。所以,在我浏览了日志之后,有一个问题困扰着我,即,如果一个应用程序在 BG 任务仍在执行其工作的情况下启动,FG和BG任务之间存在冲突会导致应用程序停用吗?我也怀疑我必须在 APp.xaml.cs 类的 Application_Deactivated() 方法中做更多的事情。这是代码。
//日志:-
windows-phone-7 - 在wp7中从墓碑中恢复时慢慢地
我在项目中遇到了问题。是关于墓碑的。我发现恢复需要很长时间,有时可以长达5分钟而没有出现错误!
我从来没有遇到过这样的问题,谁能告诉我为什么?
谢谢
windows-phone-7 - VieModel collection not saved during State Save/Tombstone
If I lock my phone while running my application and unlock it say after 30 minutes or 60 minutes, my screen appears blank. All my data (its a huge list compare it to a user's twitter feed) which was in an Observable collection
in my ViewModel
has disappeared. When I refresh I get NullReferenceException
. Note that I am not handling any state save
while locking and unlocking the phone. Is that the reason for the loss of my data? How can I handle it? Since there is a limit on the state data which can be saved of 4Mb Max, will it affect the functioning of my application even if I do implement it?
[Update]
I have tried the following things:
1) http://www.scottlogic.co.uk/blog/colin/2011/05/a-simple-windows-phone-7-mvvm-tombstoning-example/
2) http://www.scottlogic.co.uk/blog/colin/2011/10/a-windows-phone-7-1-mango-mvvm-tombstoning-example/
and many more.
The problem which I now face is that my application's viewModel contains an observable collection
which I have binded to the UI. This observable collection is a collection of my user-defined class which contains complex data members
. One of them is a dictionary
. When i try to save my viewModel using XMLSerialization
it throws an error as XML serialization doesn't support Dictionary.
I have also tried to write my viewmodel after Data contract serialization
onto the IS during App_Deactivated and retrieve it on App_Activated. But my collection is null on resume. On opening the IS file it shows that the collection was not written onto the file. Am I missing some key ingredient
in-order to solve this problem?
Note: I need my list. I cannot refresh data.
windows-phone-7 - WP7 墓碑与 Protobuf-net
我protobuf-net
在 WP7 中使用来序列化我的数据。
我在启动应用程序时初始化了我的自定义类型,但我有一个大问题:
如果我在后台(墓碑)启动我的应用程序几分钟,当应用程序变为活动状态时,由于我尚未初始化类型,因此会引发异常。
有没有人可以解决这个问题?谢谢!
解决方案:
我解决了这样的问题:
windows-phone-7 - Caliburn Micro 中的墓碑
我有带有项目(ObservableCollection)的 MainPageViewModel。在此页面上,我还有一个按钮,用于向 Items 添加新项目。
添加新项目非常完美。
但是当应用程序在墓碑后激活时,来自项目的数据不会恢复。尝试为我的 ViewModel 创建 StorageHandler。没有帮助。我做错了什么?
还可以尝试为类和属性添加 [SurviveTombstone],但 Visual Studio 不知道该属性。
windows-phone-7 - Windows Phone - 墓碑
我有一个包含个人数据的应用程序,当应用程序发送到后台时,该应用程序不应显示在 WP8 的任务查看器中。
我的想法是在Application_Deactivated
事件中引发一个黑页,但 UI 似乎只在应用程序再次重新激活时更新,在任务查看器中仍然是旧 UI。
您对此问题有任何想法/解决方案吗?
c# - 为 Tombstoning 保存字符串值
我目前正在为 Windows Phone 7.1 开发应用程序,并且需要在用户退出应用程序时保存一些数据。
该应用程序非常简单:MainPage 是用户看到的第一件事,他们在其中选择了四个购物中心之一。下一页询问他们将车停在哪里并将其存储为字符串变量。最后一页加载该字符串变量并向用户显示相关信息,以及自启动应用程序以来一直在运行的计时器。
我要保存的是用户离开应用程序时的用户输入数据和计时器值,以便再次启动它时,它会自动显示包含用户信息的最后一页。
我一直在玩生成的 Application_Launching、Activated 等事件,但到目前为止还没有工作。任何帮助将不胜感激。
编辑:这是我到目前为止的一些代码(没有带我去任何地方)
那在我的 App.xaml.cs 类中
windows-phone-8 - 从墓碑返回时的应用程序认证要求
我有一个页面,用户可以在其中输入他的姓名并附上图片。
从墓碑状态返回时,我的应用程序是否也必须恢复图像?
是否是应用程序认证要求,没有它我的应用程序将无法通过认证?还是推荐的模式?
例如,当我有一个枢轴时,同样的问题是,是否必须保存选定枢轴项的索引并在从墓碑激活时恢复选择?
没有必要:是否有流行的库\框架来帮助我对对象、图像等进行墓碑化和序列化?
windows-phone-8 - 页面上的 Windows Phone 应用程序停用检测
我正在使用 Windows Phone。当我的应用程序停用并进入后台时,我想检测 OnNavigatedFrom 事件上的应用程序停用,以便我可以在应用程序进入后台时实现一些逻辑。我怎样才能做到这一点?????
windows-phone-7 - Windows Phone:当应用程序在睡眠/手机锁定后唤醒时转发到不同的屏幕
我开发了一个 windows phone 7 应用程序,一旦用户在运行应用程序时锁定手机,当手机解锁时,应用程序必须将用户转发到不同的 .xmal 页面。
原因是该应用程序显示敏感信息。因此,如果用户在应用程序中间锁定他/她的手机并将其留在桌子上,没有人可以来解锁手机并查看敏感信息。
所以我想将用户转发到我已经创建的“输入 pin”页面。
提前致谢!