如何以编程方式创建实时文件夹(将意图发送到主屏幕)?
我想知道如何以编程方式创建实时文件夹,以及我需要在我的应用程序中请求哪些权限。
我读过很多关于如何通过普通的 home-long-press 方法创建 LF 的文章和帖子。
我假设我需要向主屏幕发送特定意图,但我似乎找不到要发送到的主屏幕活动的名称,也找不到发送的意图。
我该怎么做呢?
I'm wondering how I can go about creating a Live Folder programmatically, and what permissions I would need to request in my app.
I've read a bunch of articles and postings about how to create a LF via the normal home-long-press method.
I would assume I need to send a specific intent to the home screen, but I can't seem to find the name of the home screen activity to send to, nor the intent to send.
How can I go about doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不知道。您无法将活动文件夹、应用程序小部件等添加到用户的主屏幕。用户需要通过长按主屏幕或主屏幕提供的其他机制来请求它们。
此外,请记住,有相当多的主屏幕,因此即使有一些未记录的 API 可以让您执行此操作,其他的很可能不会。
You don't. You cannot add live folders, app widgets, etc. to the user's home screen. Users need to request them via a long-click on the home screen or other mechanism that the home screen provides.
Moreover, please bear in mind that there are quite a few home screens out there, so even if one has some undocumented API that would let you do this, the others most likely will not.