O
O
Oleg2020-01-22 02:08:34
Android
Oleg, 2020-01-22 02:08:34

Is it forbidden to change the text of Notify from foreground Service since API 26?

There is a service. as text I want to display information about the task queue to the service.
The initial text is displayed and the service starts as required - startForeground(ID_NOTIFY, notification) .
Can't change text dynamically.
For Build.VERSION.SDK_INT >= Build.VERSION_CODES.O everything has been rewritten without deprications.
I tried to change the text in the course of work through
startForeground(ID_NOTIFY, notification); and via notificationManager.notify(ID_NOTIFY, notification);
The text does not change.
What did I miss in the documentation. I found it, just if I don’t display a notification within 5 seconds, then the service will end.
Not my case. You can not change more than once every 200 ms - no, not it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2020-01-22
@402d

about stupid. You have to go to bed earlier. In this thread, I forgot to change the fix text to a variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question