Android show icon in status bar

I want to show my application icon in the status bar without a tray and tray for notifications. exactly the same as the alarm icon icon. I also make the app look like an alarm clock.

I have a few questions about stackoverflow, some say this is not possible without a notification / drawer tray, but I saw how few applications did this.

Can someone help me better?

thank

+4
source share
1 answer

As examples, you used some applications for the alarm clock, so I think you can begin to understand that this is the alarm icon in the status bar, and as shown there.

, , , "Alarm Clock Plus" , .

, Pre-Lollipop:

protected void setStatusBarIcon(boolean enabled)
{
    Intent alarmChanged = new Intent("android.intent.action.ALARM_CHANGED");
    alarmChanged.putExtra("alarmSet", enabled);
    sendBroadcast(alarmChanged);
}

, ( ) ( ), , . , , .

: - () (). - - ( ), , . .

,

+2

All Articles