Yellow Banana Kids App is an Android e-commerce app that helps to view everything your child needs with the help of a single tap and easily order it for them from the comfort of your homes.
The client of Yellow Banana Kids App wanted an e-commerce app for kids where the app can list down various different categories for the kids related products like clothes, toys, books, etc. It also has some blogs listed down on various topics related to kids and their products. The categories, products, and list of blogs should come from one NOPCommerce Plugin that we have developed for the client which will basically fetch all the data from client's database or any NOPCommerce website.
The app is a very basic e-commerce app with category and products listing. It also has a listing of blogs in another screen. But the main challenge came in the app when we needed to implement push notifications for any new blog published from the admin panel. However, we did not have an access to write anything in the client's database through our NOPCommerce Plugin. We also did not get the event when any new blog is published in the database. For implementing push notification, our app can send device tokens to API Plugin but due to the restrictions in NOPCommerce, Plugin could not store device tokens in the client's database. Hence, there was no way to send push notifications to user's devices.
For resolving this issue, Space Stem experts came up with an idea of using Realtime Database of Firebase. We have started to store Firebase Device Tokens in the Realtime Database from device. The NOPCommerce Plugin will access the Firebase Database to fetch all the stored device tokens and send push notifications to multiple device tokens together. But we can't just implement the code to send the push notifications anywhere in the plugin because we could not get the event when the new blog is published. So, we have introduced a new page in the Local Plugins section in the NOPCommerce Admin Panel. This new page lists down all the published blogs by the client. We have kept one button alongside each blog title in that page from where admin can send push notification for that particular blog.