Special notice for using the server project in Android -- wiki update #2205
llacx-ayoti
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
after many tries to make the Mqtt Server runs on Android,
Please see below code that make the server works, listening on every IP v4 adresses on the device.
This code works for mqtt server version 4.3.7.127 and v > 5
This code also works on windows 11 and Linux (validated on ubuntu 22.4 LTS)
So maybe the wiki can be updated with this code snippet ...
`
public class MqttService : MyBaseServiceClass
{
MQTTnet.Server.MqttServer? _mqttServer;
public const int MQTT_PORT = 1883;
Beta Was this translation helpful? Give feedback.
All reactions