简体   繁体   English

如何以编程方式强制小部件显示在锁定屏幕上(Android)

[英]How to force a widget to appear on lock screen programmatically (Android)

I want to force a widget to appear on the lock screen in Android.我想强制一个小部件出现在 Android 的锁定屏幕上。

Any ideas or code examples?任何想法或代码示例?

Thanks in advance.提前致谢。

First, the standard Android lockscreen framework only supports app widgets from Android 4.1 through 4.4, which is a steadily shrinking portion of the Android device ecosystem.首先,标准的 Android 锁屏框架仅支持从 Android 4.1 到 4.4 的应用小部件,这是 Android 设备生态系统中不断缩小的部分。

Second, there is no programmatic means, in standard Android, to force the user to add an app widget to the home screen or to the lockscreen.其次,在标准的 Android 中,没有程序化的方法来强制用户将应用小部件添加到主屏幕或锁屏。

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

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