0

I am creating app in which I had to send data to phone via embedded device.

Is it possible to send file via embedded device to Android phone with Bluetooth?

I don't find any of example of it and I think I need another embedded device like dongle for implementing obex protocol.

halfer
  • 19,824
  • 17
  • 99
  • 186
chikka.anddev
  • 9,569
  • 7
  • 38
  • 46

2 Answers2

2

You need to read in the bytes of the file that is being submitted by your device. Sample code that connects the android to a separate device can be found in this SO post. There is also a robust documentation of the API as well as a specific sample application. Be aware that many people are finding issues when using the sample application to try and connect the android to a separate device. The issue is explained in this SO post (see the accepted answer), but essentially the connectivity problem is caused by calling listenUsingRfcommWithServiceRecord.

I myself ran into problems with Bluetooth, but using the above resources have been able to quite successfully connect my android with an embedded device. Hopefully this aggregate of information will be of use to you.

Community
  • 1
  • 1
sahhhm
  • 5,325
  • 2
  • 27
  • 22
  • 1
    Thanx.i think it really helps me.i really dont try it but i think it maybe worked but i have question that you must have to specify your uuid as in that example it is fixed.we cant discover it if i dont know. – chikka.anddev Jan 04 '11 at 07:01
0

You can use the very common UUID for SPP devices: ("00001101-0000-1000-8000-00805F9B34FB");