Send 5MB via bluetooth

hi,
i'm creating 2 apps, one client and other server bluetooth.
my goal is to send a picture (approximately 4 MB) from client to server app via bluetooth.
i convered the picture from file to string but the problem is that i don't receive all the string in my server
bluetooth app, i receive only some KB.
client side:


server side:

where an i wrong?
is that possible to send a big picture (some MB) via bluetooth?

Thanks

Bluetooth packets are pretty small and so you'll probably experience buffering on either the client, server, or both. You may want to send the expected size first and then keep reading until you've read that many bytes. This may require multiple loops through the code reading values and putting them into an intermediate result before writing.

Generally, I would not recommend Bluetooth for this task. It might be better to use Wifi direct or just run an intermediate server that both devices can talk to over a protocol like HTTP.

5MB is too large to send via BT, try KB files...