0

I have created an app that has a support/chat feature. A user can login to the app and request for help using the chat page. When they send a message, my back-end webapi creates a ticket and a message linked to that ticket. An admin already setup is allocated to provide assistance. For now, if the admin also has the app open and on the chat page, they can see the new ticket, can click on it and respond. If both users have their apps open and on the chat detail page then they can see what the other has typed.

However, I would like to integrate a feature like whatsapp where I can notify the admin when a user sends a new message without the admin having his app open and on the chats page. I’ve been looking at the Phonegap push plugin but I cannot really understand how I can use it to achieve what I am trying to do. Most tutorials I’ve come across are using Firebase to send a notification to the user, but how does a message/notification move from my database where it is stored to firebase?

enter image description here enter image description here enter image description here enter image description here

Please bare with me if I am completely lost and if possible please point me into the right directions. I’ve attached some pics of my app as is.

Morgs
  • 1,558
  • 3
  • 19
  • 34
  • Firebase is just a dependency for device token generation. Using push plugin you will get a device token. At the time of login save that token to your users profile(in database) and Send Notification using that token to the user. what are you using as backend? – Najam Us Saqib Jun 15 '21 at 11:27
  • @NajamUsSaqib I am using Ionic 4 with ASP.NET C# webapi. Do you know how I can perform the last part of sending the notification using the saved token? – Morgs Jun 15 '21 at 12:00
  • 1
    Check this: https://stackoverflow.com/questions/37412963/send-push-to-android-by-c-sharp-using-fcm-firebase-cloud-messaging – Najam Us Saqib Jun 15 '21 at 12:01
  • 1
    @NajamUsSaqib you saved my life from the above comment. Thanks mate – Morgs Jun 15 '21 at 23:46
  • Glad to hear that. – Najam Us Saqib Jun 16 '21 at 06:36

0 Answers0