4

I am developing an Android application which needs a Contact to be transmitted from one android device to another via Bluetooth. How to successfully transfer the contact?

Is there any efficient way to transfer the Contact?

Any help will be appreciated.

Kartik Bhatt
  • 924
  • 4
  • 16
  • 33

1 Answers1

0

Try to use the link for the bluetooth transfer of images. You have to use the byteArray in case of transfering images via bluetooth.

ByteArrayOutputStream bos = new ByteArrayOutputStream();
b.compress(Bitmap.CompressFormat.PNG, 0 , bos);
byte[] bitmapData = bos.toByteArray();  
bluetoothManager.sendDateToBTDevice(bitmapData);

You can go thro the BluetoothChat example in API demo n proceed wit that

Community
  • 1
  • 1
Hussain
  • 5,552
  • 4
  • 40
  • 50
  • Thanks, but I want to send Contact via Bluetooth. – Kartik Bhatt Jun 23 '11 at 11:48
  • I dont know whether there is any specific thing like sending business card thro' bluetooth. U can extract the contact info and send, then from there you can gather and make it as contact. – Hussain Jun 23 '11 at 11:50