Reputation: 44739
I have read: https://developer.android.com/guide/topics/ui/notifiers/notifications.html but I cannot see how to display an icon on the top of the screen, without making a notification.
I have an app with a long-running service, and I want to show an icon that reflects the internal state of that service, at the top of the screen.
How can I do this?
Upvotes: 0
Views: 605
Reputation: 1006614
I want to show an icon that reflects the internal state of that service, at the top of the screen. How can I do this?
Make a Notification
.
Or, download Android's source code, modify it to allow random apps to put icons in the status bar that the user cannot control, build your modified version of Android, package that into a custom ROM, and convince people to use your custom ROM on their devices.
The only non-Notification
status bar icons that apps can semi-directly control are:
setAlarmClock()
on AlarmManager
Upvotes: 2