Once again, another article about this little puppy called 32Feet.NET. In the previous article I show you how to download a file, now we will send a file to the remote device. Once again, proceed in two steps. First one, as in the previous article (https://istacee.wordpress.com/2013/02/22/download-a-file-through-bluetooth-in-c-with-32feet-net/) juste retrieve the BluetoothDeviceInfo object. And here’s the upload method 🙂
public void SendFile(BluetoothDeviceInfo device, string fileToSend, string destinationPath) { // Build te OBEX uri and create an OBEX web request var obexUri = new Uri("obex://" + device.DeviceAddress + "/" + destinationPath); var request = new ObexWebRequest(obexUri); // Fill the request with the file data request.ReadFile(fileToSend); // Send the request to the targeted bluetooth device var response = request.GetResponse() as ObexWebResponse; response.Close(); }
Can you please send a code for pairing of device (laptop and a hand held device) using 32feet library
Nop, but here’s what you’re looking for : http://stackoverflow.com/questions/16802791/pair-bluetooth-devices-to-a-computer-with-32feet-net-bluetooth-library 🙂 Catch you next time and keep it bug free !
Can you tell me how to call this function,please?
Haow send Image File?????
My idea is: I create the program that will detect my partner’s pc via Bluetooth. This accepts communication (or I have direct communication, because it can be both ways) that has an image in a folder in the c: \ image \ directory, for example.
After my pc has to do the “download” of the image and I see the image on my pc.
I need suggestions from the community. I have visual studio 2015 installed that I use for C # classes. I have already installed the necessary libraries.
Do you have the complete program?
Thank you for your help.