简体   繁体   中英

bluetooth file transfer using 32feet and c#

I am trying to transfer the file to another device using bluetooth and 32feet.net and c#. When I am trying to connect the other device I want to show an alert in the client device.

How do I do this?

  1. what kind of alert/message?
  2. make sure the blue tooth devices have been switched on, and connected, and authenticated.
  3. did you pass the wrong device address?

I use the following code, it's working fine:

var file = @"C:\foo.JPG";
var uri = new Uri("obex://" + "REMOTE_DEVICE_ADDRESS_HERE" + "/" + file);
var request = new ObexWebRequest(uri);
request.ReadFile(file);
var response = (ObexWebResponse)request.GetResponse();
//check response.StatusCode
response.Close();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM