hey!
I am new to c# and bluetooth programming. I am trying to build an application that can send/receive vnotes from/to pocket pc (windows mobile) to normal cell phones (sony-ericsson).
sending vnotes from pocket pc to cell phone already seems to work properly. just receiving on the pocket pc doesn't work. when the application is started it does not receive the files... instead windows mobile handles the file transfer.
any idea what could be wrong or how I can turn of receiving through windows mobile itself?
below is my code for the receiving stuff...
ObexListener listener;
listener = new ObexListener(ObexTransport.Bluetooth);
listener.Start();
System.Threading.Thread t1;
t1 = new Thread(ReceiveVnt);
t1.Start();
public void ReceiveVnt()
{
while (listener.IsListening)
{
try
{
ObexListenerContext olc = listener.GetContext();
ObexListenerRequest olr = olc.Request;
MessageBox.Show(olr.ContentType.ToString());
olr.WriteFile("vnote.vnt");
MessageBox.Show("Empfangen!");
}
catch (Exception ex)
{
MessageBox.Show("Fehler beim Empfangen");
}
}
}