3

In Android, notifications can be set to be "onGoing", which means they are sticky and cannot be swiped away. Some common examples are music players, and Android's own update notifications.

I have an app that senses when a user enters a gym and starts timing. All of this is done in the background (using GPS), and I show a notification with a message when a visit is detected.

Does it make sense to make my notification sticky while I am recording gym time? I'm afraid a user may find it unnecessary.

edit -I should mention the user can also end visits from the app

The screenshot below is my app notification on the top, followed by three sticky notifications from other services.

Notification

(If I were to make it sticky the message would change to "You are currently at the gym")

6

FLAG_ONGOING_EVENT:

Bit to be bitwise-ored into the flags field that should be set if this notification is in reference to something that is ongoing, like a phone call. It should not be set if this notification is in reference to something that happened at a particular point in time, like a missed phone call.

In your case the notification is referring to a timer that is running, so I think it makes sense to have it as an onGoing notification.


As you comment in the last paragraph, make explicit that a process is running and which process it is:

"Your Gym timer is currently running."

and the time if it is relevant and common in these notifications.

3

I think in this form it should not be sticky. It just informs about an event that has happened. User will not benefit seeing it again.

Sticky notifications make sense whenever it would be beneficial for Users to revisit them. This may be true for:

  1. notifications that constantly update (e.g. Maps notification showing a simplified information about the route),

  2. notifications that give Users means to control running background processes (e.g. Music players),

  3. nnotifications giving User control over some important content (e.g. Todo apps, that display a summary of current tasks, or a note taking app that allows User to quickly add a note),

However, I believe you could benefit from making this notification sticky if you combined the 1 and 2 from the above, e.g. By displaying current timer measure and allowing them to pause the workout.

Also, note that on Android sometimes a persistent notification is needed to maintain a background process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.