Hi,
I`m developing a file sending application from PC to mobiles. I`m using Brecham OBEX with Object Push service. Everything works fine, but there are some problems. For example when I make test with LG GT505 it works without any intervention from the PC bluetooth driver or Windows, everything starts and ends up in my application. But when I eg. use LG KP501 I`m having some confirmations to pass on mobile and on PC, when I agree Virtual Com Port is installed. I can`t deal with this because my application must be fully automatic. Do you have any ideas what can I do to avoid this? The second problem I have is that even I always use a disconecting methods for obex session as well as for client connection, mobiles not always disconect properly and I dont know why.. (?) I show some code:
BluetoothClient client = new BluetoothClient();
ObexClientSession ObxSession = null;
try
{
client.Connect(BtDev.DeviceAddress, BluetoothService.ObexObjectPush);
if (client.Connected)
Console.Write("polaczony\n");
else
Console.Write("rozlaczony\n");
ObxSession = new ObexClientSession(client.GetStream(), UInt16.MaxValue);
ObxSession.Connect();
file = new FileStream(args[1], FileMode.Open);
ObxSession.PutFrom(file, Path.GetFileName(args[1], null, file.Length);
file.Close();
ObxSession.Disconnect();
client.Close();
}
catch (Exception e)
{
client.Close();
Console.Write(e.Message + '\n');
}
Sorry for my english and pls for some tips ;)