GithubHelp home page GithubHelp logo

badgeforappicon's Introduction

BadgeForAppIcon


The unread badges of the android launcher icon.

1 Add BadgeForAppIcon to your project

1.1 gradle

Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.whytot:BadgeForAppIcon:v1.0.0-beta.2'
}

2 How to use

2.1 code

new IconBadgeNumManager().setIconBadgeNum(getApplication(), notification, count);

2.2 MIUI(xiaomi)

* -notification cannot be null
* -notification must be sent

3 Support List

3.1 Huawei (Support)

Launcher : com.huawei.android.launcher

https://developer.huawei.com/consumer/cn/devservice/doc/30802

3.2 Xiaomi (Support *)

Launcher : com.miui.home

https://dev.mi.com/console/doc/detail?pId=939
*: Notifications must be sent simultaneously, but the Numbers can be customized.
*: When app have been open, the indicator disappears.(So when the app is in the foreground, you can't see badge)
*: Only for MIUI6-10.

3.3 OPPO (Support *)

: Support , but need apply
Please contact the customer service staff on the OPPO developer platform by yourself. He will explain how to apply for this function.
: I am currently in the application stage. If I succeed, I will update this method.

3.4 VIVO(Not Support)

No support and no channels to apply.
This feature must be specifically supported by VIVO.

3.5 Samsung (Support *)

Launcher : com.sec.android.app.launcher

*: Support, but no official statement

3.6 Meizu(Not Support)

3.7 Google(Support *)

Launcher : com.google.android.apps.nexuslauncher pixel 2(Pixel Launcher)

https://developer.android.com/training/notify-user/badges
*: Support(Starting with 8.0 (API level 26)),but the number cannot be displayed on the corner mark, and you need to press the icon for a long time.
*: Color is not red.

badgeforappicon's People

Contributors

whytot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.