动态壁纸可以链接到应用程序吗?
我是动态壁纸新手。是否可以将动态壁纸链接到具有自己引擎的应用程序?我的意思是,避免使用典型的“动态壁纸设置”,您可以在其中选择想要在壁纸中显示的项目数量(主要是鱼xD)。我想要有自己的应用程序来管理动态壁纸的内容。这可能吗?如果答案是肯定的,如果您告诉我如何做,我会很有帮助。
i'm new at live wallpapers. Is it possible to link a live wallpaper to an app with it's own engine? I mean, to avoid using the typical "Live wallpapers settings" where you choose the amount of items (mostly fishes xD), that you want in the wallpaper. I'd like to have my own app to manage the content of the live wallpaper. Would that be possible? If answer is yes, i'd be helpful if you told me how to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为 Hackbod 没有理解你的问题。如果您想将动态壁纸设置放置在应用程序中,而不是动态壁纸预览上的首选项按钮中,您可以这样做。
首先,您必须同时将您的应用程序设置为动态壁纸和常规应用程序。因此,您的清单应该包含这两部分:
第二
,您应该保留应用程序中所做的用户设置更改(您可以使用 SharedPreferences),并在您的 WallpaperService.Engine 回调上更新动态壁纸行为(例如 onVisibilityChanged 或任何对您有意义的内容)。
I don't think Hackbod understood your question. If you want to place your live wallpaper settings in an app instead of in the preferences button on live wallpaper preview, you can do that.
First, you must set your application to be a live wallpaper and a regular application at same time. So your manifest should have these two parts:
and
Second you should persist user settings changes made in your app (you can use SharedPreferences) and update your live wallpaper behavior on your WallpaperService.Engine callbacks (like onVisibilityChanged or whatever makes sense for you).
抱歉,动态壁纸对于系统来说是全局的,无法根据应用程序进行更改。
Sorry, the live wallpaper is global to the system and can't change per-application.