How to get android image sent by server using Obex FTP

I developed an application in android using the bluetooth bluetooth chat example. https://developer.android.com/samples/BluetoothChat/index.html

I assume to receive data from the abc server by connecting my mobile client using Bluetooth. I implemented a Bluetooth connection using RFCOMM as shown in the link above. I can also receive text from the server. However, I cannot get the image file sent by the server on the mobile client. The server sends the image as a file using Obex FTP. Cannot post code here due to privacy issues.

Can someone tell me how to get image on Android using Obex Protocol? I can not find any API for Android.

0
source share
1 answer

I recommend you import the javax.obex library. This library has nice APIs that will help you work with the OBEX protocol. However, I had some problems using the library because I could not find the package from the compiler package. I solved this problem by copying the whole javax.obex source files related here .

The next problem was the implementation of ObexTransport , but I solved this problem by changing this one , as it caused a runtime error that some methods are missing.

The last step is to open the OBEX Bluetooth server using apis. This and this files will help a lot.

Postscript I am developing the Android OBEX telnet Bluetooth server (?) And am going to lose my source files on github. I will let you know later if you want. Anyway, I hope my answer helped.

Change: I posted a more detailed explanation here . And the github repository is here.

0
source

All Articles