简体   繁体   English

如何在wp7中自动启动应用程序而无需用户实际单击图标

[英]how to automatically launch the application in wp7 without user actually clicking on the icon

I am new to wp7 I want to create an application which should start automatically without user starting it. 我是wp7的新手,我想创建一个无需用户启动即可自动启动的应用程序。 Something similar to automatic virus scan on any PC. 类似于任何PC上的自动病毒扫描。

Any suggestions please,A good example with code will make me understand better Thanks 请任何建议,一个很好的代码示例将使我更好地理解谢谢

Not possible. 不可能。 And thanks to Microsoft for not making it possible. 还要感谢Microsoft无法实现这一目标。

Applications must be started by the user. 应用程序必须由用户启动。 Depending on what you are attempting to build, a PeriodicTask might be suitable. 根据您尝试构建的内容, PeriodicTask可能合适。 It allows you to run code for ~25 seconds every ~30 minutes. 它使您每30分钟可以运行25秒钟的代码。

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. 另外,如果用户不重新运行您的主应用程序(允许您重新创建任务),它将在2周后停止计划。

At most you can set a Reminder to popup at 12 PM every day to remind the user to open your app. 您最多可以将提醒设置为每天中午12点弹出,以提醒用户打开您的应用。 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. 如果允许自动打开应用程序,那么所有the动的应用程序都会自己打开它们,并使我的生活痛苦不堪。 That's how viruses and trojans function. 这就是病毒和木马的功能。 So if your app is legitimate then let the user decide to open it or not. 因此,如果您的应用程序合法,则让用户决定是否打开它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM