I have been developing a bluetooth chat app while taking reference from developers code of bluetooth chat. My app is connecting to devices and sending and receiving messages but I am not able to understand how should I send Images over chat. I want to browse gallery and then send it through chat. I also want to send files using totally different activity.
Asked
Active
Viewed 1,125 times
1
-
possible duplicate of [Programmatically transfer images through bluetooth](http://stackoverflow.com/questions/10191064/programmatically-transfer-images-through-bluetooth) – Oleksandr Sep 22 '15 at 10:14
-
@Alexandr I have implemented chat using sockets in my app. I want to send images and files using this sockets only. – Shivam Mohan Sep 22 '15 at 10:49
2 Answers
0
You can encode and decode your bitmap with Base64 and send it as String via Socket. See this answer for more details.
You can also split String to multiple messages and join them during receiving.
0
And if you want it less resource hungry you can implement the BIP profile

Jon Carlstedt
- 2,317
- 5
- 22
- 27