I need to show my app icon in the status bar when my app is powered on (my app has a power on and off state) to show that it is on. Is there any way to set a status bar icon without a notification like the alarm app show a alarm icon in the status bar when there is an alarm is scheduled.
Asked
Active
Viewed 430 times
0
-
Duplicate of [this](https://stackoverflow.com/q/19604960/115145) and [this](https://stackoverflow.com/q/39553676/115145). – CommonsWare Dec 03 '16 at 18:17
-
@CommonsWare I find same question in the this site but I can't find any good solution can you please help me? – Ajay Sivan Dec 03 '16 at 18:20
-
"I can't find any good solution" -- that is because there is no solution. – CommonsWare Dec 03 '16 at 18:21
-
@CommonsWare Ok, then how did apps like alarm do the same – Ajay Sivan Dec 03 '16 at 18:22
-
The OS adds the alarm icon when apps use `setAlarmClock()` on `AlarmManager`. – CommonsWare Dec 03 '16 at 18:23
-
@CommonsWare Ok. Is there any other way to notify the user that the app is on? – Ajay Sivan Dec 03 '16 at 18:25
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/129697/discussion-between-ajay-and-commonsware). – Ajay Sivan Dec 03 '16 at 18:25
-
"Is there any other way to notify the user that the app is on?" -- use a `Notification`. The `Notification` itself should support the user controlling the background behavior of your app. – CommonsWare Dec 03 '16 at 18:30