How do I make a push notification system whenever the app is closed?

There is the OneSignal extension.