Possibly a helpful read:
No, because a foreground service is running in the background
Which means, your app is still active in the foreground
This is not how it should be
Use logcat to find out what happens
For Xiaomi you might have to disable battery optimization, this extension can help
See also https://dontkillmyapp.com
Taifun
Thanks to @Taifun and @TIMAI2 because with this information you gave me I solved the problem . At first I applied some restrictions regarding energy saving. After that I enabled Autostart in background. Also for the service notification that remained permanent I simply had to disable the persistent notifications in the notifications.
Now I have to implement some conditions in the blocks to make sure that only the "message" node is notified because having set up other nodes that do other things for which I am not interested in receiving notifications, currently despite the configuration of the blocks that I sent you before, I continue to receive notifications even from other nodes that are not "message".
I'm taking advantage of this topic to not open another one since my doubt is always about notifications. How can I make it so that when a notification appears if I touch the notification the app opens? I'm not talking about the service notification, but the one that warns me that there has been a change in the Firebase data. Thanks in advance.
It is in here somewhere:
or maybe this:
Thanks. In the "to notification" instructions just set the intent.
The process is:
- Take the
set MelonNotification1.Intent to
block - Then hook the
call MelonNotification1.CreateIntent
block on the right side.
Fill in the fields, name: enter the name of the screen you want to open (e.g. "Screen1")`
startValue (optional): if you want to pass a value to the screen.
I typed it here, so if anyone needs it they can read it.