microbox Active Member Licensed User Longtime User Sep 3, 2021 #1 Hello everyone, I need the simplicity of MQTT for a chat app. But I also I need the option to be able send file to a specific user online. Can you give an idea what is the best way to achieve this? I have tried using the example (Network + AsyncStreams + B4XSerializator) transferring file is working but I 'm having trouble reconnecting to other user(max 5) to send message.(always disconnecting). I appreciate any help.
Hello everyone, I need the simplicity of MQTT for a chat app. But I also I need the option to be able send file to a specific user online. Can you give an idea what is the best way to achieve this? I have tried using the example (Network + AsyncStreams + B4XSerializator) transferring file is working but I 'm having trouble reconnecting to other user(max 5) to send message.(always disconnecting). I appreciate any help.
DonManfred Expert Licensed User Longtime User Sep 4, 2021 #2 Why not just use MQTT and send the file over it? If too big then you need to build a solution to send and receive files in parts. Upvote 0
Why not just use MQTT and send the file over it? If too big then you need to build a solution to send and receive files in parts.
microbox Active Member Licensed User Longtime User Sep 4, 2021 #3 DonManfred said: Why not just use MQTT and send the file over it? If too big then you need to build a solution to send and receive files in parts. Click to expand... Hello DonManfred...thank you for answering. The file is less than 4mb, is it the similar to Network + AsyncStreams + B4XSerializator? Can you please give a link/snippet incorporating MQTT? Upvote 0
DonManfred said: Why not just use MQTT and send the file over it? If too big then you need to build a solution to send and receive files in parts. Click to expand... Hello DonManfred...thank you for answering. The file is less than 4mb, is it the similar to Network + AsyncStreams + B4XSerializator? Can you please give a link/snippet incorporating MQTT?
DonManfred Expert Licensed User Longtime User Sep 4, 2021 #4 No. I do NOT see any problem here too. Convert the file to a bytearray and send this bytearray. As far as i know MQTT is able to have binary payload. What about writing 5 Lines of code by yourself? Upvote 0
No. I do NOT see any problem here too. Convert the file to a bytearray and send this bytearray. As far as i know MQTT is able to have binary payload. What about writing 5 Lines of code by yourself?
microbox Active Member Licensed User Longtime User Sep 4, 2021 #5 DonManfred said: No. I do NOT see any problem here too. Convert the file to a bytearray and send this bytearray. As far as i know MQTT is able to have binary payload. What about writing 5 Lines of code by yourself? Click to expand... okay thanks for the tip. I will try it. Upvote 0
DonManfred said: No. I do NOT see any problem here too. Convert the file to a bytearray and send this bytearray. As far as i know MQTT is able to have binary payload. What about writing 5 Lines of code by yourself? Click to expand... okay thanks for the tip. I will try it.