How to send multiple images from android mobile to pc via bluetooth connection. I made app that sends single image/file. This app uses 32feet.net and OBEX.
Here is my code:
ObexListener.mBtListener = new ObexListener(ObexTransport.Bluetooth);
mBtListener.Start();
while (this.mBtListener.IsListening)
{
Console.WriteLine("work...{0}", DateTime.Now);
// For each connection`enter code here`
ObexListenerContext obex_context = this.mBtListener.GetContext();
if (obex_context != null)
{
try
{
ObexListenerRequest req = obex_context.Request;
int counter = this.TotalCount(req);
string save_as = this.ListenerToFileName(req, this.mUploadFolder);
if (this.IsImage(Path.GetFileName(save_as)))
{
req.WriteFile(save_as);
}
}
finally
{
}
}
}