Notification without interrupt

im’m trying to use the notification command in a function (called rarely), i dont’t have a real pin pressed.
can i use it without interrupt (like the examples)?

this is the function i call:
indent preformatted text by 4 spaces
void allarme()
//digitalWrite (Sirena , LOW);
digitalWrite (Contatto , HIGH);
delay (500);
digitalWrite (Contatto , LOW);
digitalWrite (Sirena , HIGH);
previousMillis = currentMillis;
Serial.println ("----------------SIRENA----------------------");


in the example i’ve posted i din not find the error, the function is not notified, there is a mistake?

Do you have the Notification widget in your project?

Android or iOS?

yes, i’ve set it even with “hardware offline ON” and high priority, i doesn’t work notify even the offline…


Android 5.0.1