android - 更新应用时删除动态壁纸
问题描述
我的应用程序提供了一个动态壁纸,它是通过子类化WallpaperService
. 那里没有什么不寻常的地方。
我的清单声明墙纸是这样的:
<service
android:name=".feature.wallpaper.AppWallpaperService"
android:enabled="true"
android:label="@string/wallpaper_label"
android:permission="android.permission.BIND_WALLPAPER"
android:icon="@mipmap/ic_launcher_round">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data
android:name="android.service.wallpaper"
android:resource="@xml/wallpaper" />
</service>
从应用程序中设置壁纸,也可以通过系统的壁纸设置完美运行。
但是,当应用程序更新(通过 Android Studio 或 Play 商店)时,我的壁纸将被默认的 Android 壁纸替换。
如何确保壁纸比应用更新更有效?
附带说明:系统重启就像一个魅力。
解决方案
推荐阅读
- angular - Angular 4 路由参数验证
- angular - Angular 2 CLi ng new 不创建项目
- sql-server - 创建了一个 SQL 代理作业来运行一个使用 FTP 连接的包
- css - 使用 SVG 组件的 css 样式在点击时使可见性“粘滞”
- stored-procedures - 无法使用数字分区键查询 Cosmos DB
- javascript - 如何在节点上下文中抑制 window.function 调用,例如未实现:window.scrollTo
- javascript - 如何让 firebase 将最后 5 个搜索结果显示到 HTML div?
- google-apps-script - 我想要一个脚本按钮,将 A 列的值减去 B 列的值
- laravel - 验证 Laravel 中的唯一名称和名字
- dart - Dart Aqueduct 服务器基本授权