I am experimenting big delays on the sendBroadcastNotification functionality. Everytime a switch is ON, I receive a message in my phone, but take time between 20 seconds and a few minutes. Depending on if phone is on wifi or not, if phone is on sleep mode or not.
I am using Samsung Galaxy S9+ Plus
and the following simple rules
Item sonoff02 changed to ON
sendBroadcastNotification("Llaman al timbre")
The issue is reproduced always in this 2 scenarios:
When is not connected to the local network. Takes 30 seconds more or less, even with the phone unlocked.
When phone is on sleep-mode, takes until 2-3 minutes. As soon as I unlock or push a button, I receive the notification.
The rules is located at the end of the file. Is this relevant? Should i put it at the begining? ¿Maybe is a Samsung setup?
I get this message while phone is locked. It seems that while phone is locked openhab App does not receive the notification. It is something on the Android setup, but I have setup everything to allow push notification even when phone is locked, and does not work.
Maybe I am missing something on the Android setup.
You are right.
After testing, is more an issue with the lock screen functionality. After locking the phone, wait some seconds and perform the test, I get nothing. Maybe when screen is locked the phone immediately hibernate, but I do not know how to change that.