I have notifications that work very well scheduled, but the problem is that if I want a notification, I have to press a button to receive notifications. I want the notifications to come without pressing the button. I don’t know where to put the code to do that. Do I put it in the instate on the home page?
I expected to put it on the main page but I don't know where
When you first enters your application you need to get a token from firebase notification if you are using firebase for notification then you make sure that you send notification to that token hence there is not need to click on button to do so it will handle the background notification itself but you have to handle the foreground your self.
If you are using some kind of schedular like workManager or something like that. You can also start that service when the app gets started and make sure that service triggers local notification.