开发者

Send Contact via bluetooth in android [duplicate]

开发者 https://www.devze.com 2023-03-14 18:04 出处:网络
This question already has answers here: 开发者_StackOverflow中文版android vcard string to contact
This question already has answers here: 开发者_StackOverflow中文版 android vcard string to contact (2 answers) Closed 2 years ago.

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消