应用程序图标与android上的计数器 [英] Application icon with counter on android

查看:165
本文介绍了应用程序图标与android上的计数器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在桌面上的应用程序图标上实现计数器? (就像SMS应用程序显示未读消息的数量一样)

How can I implement counter on application icon on the desktop? (like SMS application shows number of unread messages)

我应该实现相同的小部件吗?
是否有任何教程?

Should I implement widget for the same? Is there any tutorial?

推荐答案

您无法修改应用程序图标 - 图标路径存储在AndroidManifest中。 xml,这两个文件都使用您的证书进行签名,应用程序无法写入自己的.apk文件。您可以尝试一个黑客 - 安装一个包装应用程序,并让它安装/卸载一堆其他虚拟应用程序,它们将有一个不同数字的图标。但是,这将需要应用安装权限,用户将收到警告。

You cannot modify an application icon - the path to icon is stored inside AndroidManifest.xml, both files are signed with your certificate, application cannot write to it's own .apk file. You may try a hack - install one "wrapper" app, and let it install/uninstall bunch of other dummy apps, which will have an icons with different numbers on them. However this will require app install permission, which users will be warned about.

所以你必须实现一个小部件。

So you have to implement a widget.

这篇关于应用程序图标与android上的计数器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆