Tag: mqtt

2020.12.17.

Xamarin.MQTT

https://github.com/officialdoniald/Xamarin.MQTT NuGet Gallery | Xamarin.MQTT 1.0.0 Usage: I created two contructors of the MQTTConnection class. You can init this object with a specific MqttClientOptions and a string array of your topics, or with username, passowrd, a string array of your topics, servername, port and clientid. https://github.com/officialdoniald/Xamarin.MQTT/blob/master/Xamarin.MQTT.Example/Xamarin.MQTT.Example/App.xaml.cs I created in the App.cs a static variable of the MQTTConnection class, so I can reach this object anywhere. […]

2020.09.01.

Xamarin.Forms – Using MQTT and Azure IoT Hub

If you have an Azure IoT Hub, you may also need a mobile app. You can communicate with Azure IoT Hub just like a regular MQTT. First step: create a Xamarin.Forms application (but very important, you can use this snippet in any native project, just copy this to the platform’s project). Right click on the Standard Library and click on Manage NuGet Packages. Add the […]

2020.09.01.

Xamarin.Forms using Mqtt

We can using of course mqtt in Xamarin.Form via dependency service / Xamarin.Forms.MessagingCenter, event or simply create a class instance. We are following the last option. First step, we need to install the MQTTnet NuGet Package for the Solution. (So in each project.) .NET Standard Library: We need to create an MqttClientRepository class in the .NET Standard Library. Next step the platform specific implementations. Android: […]