0

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?

1 Answer 1

2

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:

  • whether there is a GPS-active icon, by registering for location updates
  • whether there is an alarm-clock icon, by using setAlarmClock() on AlarmManager
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.