Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
In this blog, we will see how we can send push notifications using Google API. For this, we have to first create valid payload data, which we will pass in the request body and we also need the Firebase server key of our Firebase project.
Let start, you need to add the below code in a ViewController and call the below function when you want to trigger the notification.
In the above method, we have created payloadData dictionary and passed it to the request body. We have created a variable token. The token variable stores the firebase device token. we will set the device tokens of that device on which we want to send a push notification. We also need a firebase server key which we can get from our firebase project inside the firebase console.
When the Google API is hit successfully then we can see the push notifications on the device.
Please follow the above steps in order to send push notifications through Google API to the selected device. You can also check other blogs from here. If you have any issues, query or suggestions then you can leave your issues/query/suggestion in the comment section.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.
Osama
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.