Ionic Push Notification Problems

I am working with Ionic Notifications right now. I have gotten them to work for the test application but I have a few questions.

  1. How do I make the notifications only show up when the user is not in the app?

  2. How do I make the notifications appear when after a certain event? For example they are working right now but only when I send a notification from Ionic’s services website. I want it to show a notification whenever a user gets messaged.

Thank you for your help,


There is an API you can call at Ionic Docs - Ionic Documentation Creating push notifications is here: Ionic Docs - Ionic Documentation

Do you have an example of how to use the api in the code? I can’t figure out how to implement it in the code. For example, how do you add the notifications? Do you put the same variables in the code inside of the API?

This is an API. You call it sending an HTTP request to it. To debug, usually you use something like Postman or another HTTP Client to construct a simple request to the API and fire it off. Then you implement it in some backend language like PHP, Python or similar on the backend into your backend application.