有没有办法以编程方式自定义锁定屏幕?
我想创建一个应用程序,每次解锁 Windows Phone 时(在解锁之前或之后),该应用程序都会显示一些预定义的消息。如果之前 - 那么我希望能够以编程方式向锁定屏幕添加一些文本,或者作为以编程方式更改背景图像的替代方法。 如果之后 - 那么我希望我的应用程序在后台运行,并在每次手机解锁时显示一条消息。
如果其中一些可能或不可行,请给我一些建议或链接?
I want to create an application that will show some predefined message each time I unlock my Windows Phone: before or after i unlock it. If before - then I want to be able to add some text to the lock screen programmatically or as an alternative to change the background image programmatically.
If after - then I want my app running in the background and show a message each time the phone is unlocked.
Please give me some advice or a link if some of this is possible or not?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这一点上,这是不可能的。有用户语音建议允许访问锁定手机中的紧急联系人(http://bit.ly/s291DH),但目前无法对锁定屏幕执行任何操作。
至于以编程方式更改锁定屏幕以在锁定之前或之后显示不同的消息,如果我理解正确的话,这是不可能的。原因是手机关闭时应用程序不会运行,但允许在锁定状态下运行的应用程序除外,但如果它们不在前台,则它们不会运行。可以使用后台代理,但无法确定代理是否会在特定时间运行。
有些应用程序可以帮助您在锁定屏幕上添加紧急联系信息,但它们是通过将文本放在图片上,然后保存图像来实现的,您必须手动将更改后的图像设置为壁纸。
At this point, it is not possible. There is a uservoice suggestion to allow access to emergency contacts in a locked phone (http://bit.ly/s291DH), but currently it is not possible to do anything to the lock screen.
As far as programmatically altering the lock screen to show a different message before or after lock, if I understand you correctly, this would not be possible. The reason is that an app is not running while the phone is off, with exceptions of apps allowed to run under lock, but they would not run if they are not in the foreground. The background agents could be used, but there is no way to know for sure that an agent will run at a certain time.
There are apps that help you to put emergency contact info on the lock screen, but they do this by placing text over a picture, then save the image, and you have to manually set that altered image as your wallpaper.