如何在wp7中自动启动应用程序而无需用户实际单击图标
我是wp7新手 我想创建一个无需用户启动即可自动启动的应用程序。 类似于任何 PC 上的自动病毒扫描。
请提出任何建议,一个很好的代码示例会让我更好地理解 谢谢
I am new to wp7
I want to create an application which should start automatically without user starting it.
Something similar to automatic virus scan on any PC.
Any suggestions please,A good example with code will make me understand better
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不可能。感谢微软没有让这一切成为可能。
Not possible. And thanks to Microsoft for not making it possible.
应用程序必须由用户启动。根据您尝试构建的内容,
PeriodicTask
可能合适。它允许您每约 30 分钟运行代码约 25 秒。但是,需要注意的是,安装后不会发生这种情况 - 用户必须至少运行该应用程序一次。此外,如果用户不重新运行您的主应用程序(允许您重新创建任务),它将在 2 周后停止安排。
Applications must be started by the user. Depending on what you are attempting to build, a
PeriodicTask
might be suitable. It allows you to run code for ~25 seconds every ~30 minutes.However, the caveat is that this cannot occur after installation - the user must have run the application at least once. In additional, if the user does not re-run your main application (allowing you to re-create the task), it will stop being scheduled after 2 weeks.
您最多可以设置每天中午 12 点弹出提醒,提醒用户打开您的应用。您甚至可以编写代码以在用户点击提醒时打开您的应用程序。打开您的应用程序后,设置第二天的提醒。
如果允许自动打开应用程序,那么所有垃圾应用程序都会自行打开,让我的生活变得悲惨。这就是病毒和木马的运作方式。因此,如果您的应用程序是合法的,那么让用户决定是否打开它。
At most you can set a Reminder to popup at 12 PM every day to remind the user to open your app. You can even code to open your app when the user taps on the reminder. When your app is opened, set the reminder for next day.
If automatic opening of apps is allowed then all the thrash apps will be opening themseleves and make my life miserable. That's how viruses and trojans function. So if your app is legitimate then let the user decide to open it or not.