Android Question MQTT B4A Simple Example

DonRacz

Member
Licensed User
Longtime User
Hello All,

I already have an MQTT Broker running on a RPI talking to an ESP32 controlling some led strips and it all works wonderfully. The Node Red dashboard works on the browser on my phone perfectly. I would like to use B4A to have a more custom layout on my phone and tablet so here I am.

I've been going thru the MQTT Chatroom example for android and there's a lot of code in there I don't need and it's a bit confusing.

I don't require a login or password to my broker, no Multi User needed. Can I get or find a much simpler example somewhere. A label to show an incoming message from a subscription on a topic and a Button to publish a message to another topic. I think I can do what I want from there.

Thanks
Don
 

josejad

Expert
Licensed User
Longtime User
Hi Don:

Check this example.
The B4XGarageOpener.zip example make what you need. Just send a message to the ESP, and make an action when it receives an answer. Works in B4A and B4J (not tested in B4I)
 
Upvote 1
Top