I want to use the NetworkDiscovery in my Xamarin app and convert all the needed classes from Android's NsdChat application to C#.
I'm calling the Android code via DependencyService and it looks like the UI freezes right after I start a Thread.
For example:
public GameClient(InetAddress inetAddress, int port)
    {
        Log.Debug(TAG, "Creating chatClient");
        InetAddress = inetAddress;
        PORT = port;
        SendThread = new Thread(new SendingThread(inetAddress,port));
        SendThread.Start(); //the UI begins to freeze here
    }
I've read about making everything async, but this doesn't work here because the return type from Android to Xamarin PCL is different. On top of that I don't get any error messages from the debugger, other than a cryptic:
No compatible code running
 
    