Bistaff
Bistaff

Reputation: 133

Ionic 3 Push Notifications when app is closed

I’am developing an app in ionic. I’ve encountered a problem with push notifications. Which permissions I must ask to user to send him push notifications even when app is closed (like whatsapp)? And Which plugin I have to use to do this?

Thanks in advance.

Upvotes: 0

Views: 1316

Answers (1)

Ronan Lopes
Ronan Lopes

Reputation: 3380

You don't need to ask for permissions for that. Since you register your user app for using your notification service, the notification will be received, unless there's something in your android blocking the app to start on background (I had this kind of problem with ASUS Zenfone Zen UI, so I had to grant the permissions for app to start by itself... but the notification was sent, it was just blocked). OneSignal is a good and free service for doing that and it has a plugin for ionic: https://ionicframework.com/docs/native/onesignal/.

Hope this helps. Good luck!

Upvotes: 1

Related Questions