For Example: Notification like facebook, missed call and new message notification. I have attached sample screen shot here.
For Example: Notification like facebook, missed call and new message notification. I have attached sample screen shot here.
There is no general way for that, I guess there are some private extensions of the manufacturers. So you could dig for that device specific APIs, but they could been private too, better drop that idea.
Update: However for samsung devices is there a solution see this answer.
In android, we don't have badge style approach as iOS but some manufactures are supporting to display badge on app icons.
Example for badge style icon on app in android
Samsung:
ContentResolver localContentResolver = this.a.getContentResolver();
Uri localUri = Uri.parse("content://com.sec.badge/apps");
ContentValues localContentValues = new ContentValues();
localContentValues.put("package", PACKAGE NAME);
localContentValues.put("class", CLASS NAME);
localContentValues.put("badgecount", number);
update localContentResolver, if update fails then localContentResolver.insert(localUri, localContentValues);
For Sony
Intent intent= new Intent("com.sonyericsson.home.action.UPDATE_BADGE");
intent.putExtra("com.sonyericsson.home.intent.extra.badge.ACTIVITY_NAME", Class Name);
intent.putExtra("com.sonyericsson.home.intent.extra.badge.SHOW_MESSAGE", true);
intent.putExtra("com.sonyericsson.home.intent.extra.badge.MESSAGE",number);
intent.putExtra("com.sonyericsson.home.intent.extra.badge.PACKAGE_NAME", packageName);
sendBroadcast(intent);
for HTC:
Intent updateIntent = new Intent("com.htc.launcher.action.UPDATE_SHORTCUT");
updateIntent.putExtra("packagename", packageName);
updateIntent.putExtra("count", number);
this.sendBroadcast(updateIntent);
Intent setNotificationIntent = new Intent("com.htc.launcher.action.SET_NOTIFICATION");
ComponentName localComponentName = new ComponentName(packageName, className);
setNotificationIntent.putExtra("com.htc.launcher.extra.COMPONENT", localComponentName.flattenToShortString());
setNotificationIntent.putExtra("com.htc.launcher.extra.COUNT", number);
this.sendBroadcast(setNotificationIntent);