Hello
I am developer of an application that use inthehand for connecting with mobile and send file from mobile to computer via bluetooth.
I succeed to send one file from mobile to my pc and save it to Hard disk by the below code:
public windowBlueToothReciver(params object[ parameters)
{
InitializeComponent();
bluetoothListener = new ObexListener(ObexTransport.Bluetooth);
bluetoothListener.Start();
blutoothThread = new Thread(DealWithRequest);
blutoothThread.Start();
}
public void DealWithRequest()
{
while (bluetoothListener.IsListening)
{
try
{
ObexListenerContext olc = bluetoothListener.GetContext();
ObexListenerRequest olr = olc.Request;
string filePath = Uri.UnescapeDataString(olr.RawUrl.TrimStart(new char[ { '/' }));
olr.WriteFile(filePath);
}
catch (Exception ex)
{
break;
}
}
}
Now, some mobile users may select multi file and send them all together with bluetooth to my pc.
In this case the above code has error and not able to save all of files transfered to my pc.
Please help me to receive all of multi file that transfered by bluetooth.
Thank you all.