徽章上的应用程序图标 [英] Badge on App icon

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

问题描述

我需要在应用程序的应用程序"图标上显示徽章

I need to show badge on App icon in my application

我尝试过的事情:

  1. https://github.com/leolin310148/ShortcutBadger 库可用于许多设备.我检查了它的清单,发现每种类型的启动器都有权限

  1. This https://github.com/leolin310148/ShortcutBadger library do it on many devices.I have checked its manifest and saw that there exists a permission for each type of launcher

 <!--for Samsung-->
   <uses-permission      android:name="com.sec.android.provider.badge.permission.READ"/>
 <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/>

 <!--for htc-->
<uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS"/>
 <uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT"/>

  <!--for sony-->
 <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/>
 <uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/>
<!--for apex-->
<uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT"/>

 <!--for solid-->
 <uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/>

 <!--for huawei-->
 <uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" />
 <uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
 <uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />

 <!--for ZUK-->
 <uses-permission android:name="android.permission.READ_APP_BADGE"/>

2.我经历了许多已经在stackoverflow上获得的答案,例如

2.I have gone through many available answers that are already on stackoverflow like

如何在应用启动器中显示通知计数图标

我们可以在android上显示徽章编号吗像iPhone这样的应用程序图标?

如何显示带有应用程序图标的徽章计数Redmi?

在Android应用程序图标上添加未读通知徽章

是可以在Android中将徽章添加到应用程序图标吗?

所有这些资源帮助我在上述设备上完成任务,但我仍然可以看到还有很多人设备,例如xiomi,micromax等,其中wtsapp,facebook等应用程序正在显示徽章,但我无法在上面显示徽章这些设备.

All these resources helped me to attain the task on above mentioned devices but i can still see there are lot man devices like xiomi,micromax etc in which app like wtsapp,facebook etc are showing badges but i am unable to show badge on these devices.

这里有任何人实现了它.任何帮助将不胜感激.

Have anyone here has achieved it.Any help will be appreciated.

推荐答案

这不是Android系统的功能.设备制造商(例如您提到的小米)或启动器开发人员(例如 Nova启动器)可以实现它并为应用程序开发人员公开一个api,但是对此没有标准,用户也不希望它存在.

This is not a feature the of Android system. Device manufacturers (like Xiaomi you mentioned) or launcher developers (like Nova Launcher) can implement it and expose an api for app developers, but there is no standard for that, nor is it expected by the users to be there.

通常,您不应尝试在Android上执行此操作.

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

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