# How can i do a push notification service with a webservice on Ionic?

**URL:** <https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675>\
**Category:** ionic-v3\
**Created:** [August 30, 2017, 7:30am UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675 "2017-08-30T07:30:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [August 30, 2017, 7:30am UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/1 "2017-08-30T07:30:38Z")

</div>

Ok, i need some help…  
I’m finishing an app but i need some kind of service who looks in my backend and when my JSON changes (this JSON contain some valors who changes if the user get notifications) send to that user a pushmessage to the terminal even the app is off. Something like an ajax call every ‘x’ seconds but doing it in mobile.

I’ve past a few days searching but i’m completly lost and i need some kind of tutorial, example or something.

I’ve searched in the forum but i doesn’t find anything.

Thanks anyway

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [August 30, 2017, 7:40am UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/2 "2017-08-30T07:40:10Z")

</div>

You need a service/script/thing in your backend that runs via a cronjob and checks for changes in the JSON. If there are any, it uses the API of your push notification provider (there are many, googling will give you some) to send a push to the relevant user. On the app side you have implemented push and can handle it whatever way you like.

---

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [August 30, 2017, 7:42am UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/3 "2017-08-30T07:42:39Z")

</div>

whats a cronjob? What push notification service do you recommend me?

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [August 30, 2017, 8:09am UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/4 "2017-08-30T08:09:55Z")

</div>

> [@temohpab](#):
>
> whats a cronjob?

A thing that gets executed regularly. Use Google for more info.

> [@temohpab](#):
>
> What push notification service do you recommend me?

The one that fits best for your needs. Firebase or Onesignal are popular choices.

---

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [August 30, 2017, 8:42am UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/5 "2017-08-30T08:42:05Z")

</div>

And in wich part of the code is activated that firebase? In the server or in the mobile client? Sigh

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [August 30, 2017, 8:48am UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/6 "2017-08-30T08:48:17Z")

</div>

As I wrote, in the backend.  
The mobile app is just a dumb client.

---

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [August 30, 2017, 9:09am UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/7 "2017-08-30T09:09:53Z")

</div>

Anyone can show me an easy example of firebase implamentation on ionic?

In backend and in Ionic.

Thanks

---

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [August 30, 2017, 12:32pm UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/8 "2017-08-30T12:32:25Z")

</div>

Maybe with this plugin i can achieve that?

> **[Ionic Framework](https://ionicframework.com/docs/native/broadcaster/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [August 30, 2017, 12:40pm UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/9 "2017-08-30T12:40:09Z")

</div>

Not necessary. As I wrote, you only have to implement push notifications with your chosen provider in your Ionic app. All the rest is done in the backend server application that talks to your push provider’s API to trigger the sending of the notification.

---

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [August 30, 2017, 12:45pm UTC](https://forum.ionicframework.com/t/how-can-i-do-a-push-notification-service-with-a-webservice-on-ionic/103675/10 "2017-08-30T12:45:39Z")

</div>

Ok thanks for all of the tips… Maybe i can use this tuto or you would recommend me another?

> **[Push Notifications in Ionic – Ankush Aggarwal – Medium](https://medium.com/@ankushaggarwal/push-notifications-in-ionic-2-658461108c59)**
>
> Updated to Ionic 3
