Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.Intent; public class Main { public static void sendIconCountMessage(Context mContext, int num) { Intent i = new Intent("android.intent.action.APPLICATION_MESSAGE_UPDATE"); i.putExtra("android.intent.extra.update_application_component_name", "com.xiaomi.alertsystem/.ui.LogoActivity"); String s = ""; if (num > 0) { if (num > 99) s = "99+"; else s = "" + num; i.putExtra("android.intent.extra.update_application_message_text", s); } mContext.sendBroadcast(i); } }