0

I have implemented MQTTnet server broker locally which both publisher and subscriber works perfect. I have also implemented local notifications Local Notificaion Plugin when the message is published from the publisher in ApplicationMessageReceivedHandler event handler. I understand this notification doesn't push notification when my app is closed. How Can I implement notifications when my app is closed. Please note I am not using Firebase, Azure, and etc.

ARH
  • 1,566
  • 3
  • 25
  • 56

1 Answers1

1

In my opinion, in iOS if your app is not running, the connecting between your app and the MQTTnet server will no longer exist. So you can't manage to send local notifications when the message is published from the publisher.

How Can I implement notifications when my app is closed.U

You have to fire a localNotification with a scheduled time. Or use the remote-notification.

Use MQTTnet server can't manage the app to send notification when the app is not running.

I'm not familiar with android, but I think it's almost the same as iOS.

If you want your app running in the background with mqtt-client, you can have a look at this thread:mqtt-client-framework-stay-running-at-background

nevermore
  • 15,432
  • 1
  • 12
  • 30