Home Forums Support Problems with Broadcasting on Xamarin.Android

Viewing 10 posts - 1 through 10 (of 13 total)
  • Author
    Posts
  • #2644
    Anonymous
    Inactive

    Hi everyone,

    I started to use this great library and came across the following problems on Xamarin Android, perhaps someone can help me:

    Problem 1:
    Via a WPF server application I send the following broadcast:
    UDPConnection.SendObject("ConnectInformation", connectInformation, new IPEndPoint(IPAddress.Broadcast, NetworkConstants.Port));
    which can be received by another WPF client application with no problems. But my Xamarin Android application does not receive any message using the following code (same code as the WPF client which can receive the message):

    NetworkComms.AppendGlobalIncomingPacketHandler<ConnectInformation>("ConnectInformation",                                                                             ConnectInformationReceived);
    Connection.StartListening(ConnectionType.UDP, new IPEndPoint(IPAddress.Any, NetworkConstants.Port));

    It only works when I do not send a broadcast, but to the specific IP address of my android device, then all messages are received correctly. The WPF server and the android device are in the same WLAN so there should not be a problem. I also tried to send a simple string message instead of a custom object but the message cannot be received either.

    Problem 2:
    When I try to use the library ProtobufSerializer in my Xamarin Android application, I receive the following error in the application messages window and cannot receive any message:
    [] TypeRef ResolutionScope not yet handled (26) for .NonGeneric in image /data/data/XXX/files/.__override__/ProtobufSerializer.dll
    [] Missing method Deserialize in assembly /data/data/XXX/files/.__override__/ProtobufSerializer.dll, type NonGeneric
    [Mono] The class NonGeneric could not be loaded, used in ProtobufSerializer

    If I switch to the BinaryFormaterSerializer the same code works and messages can be received.

    Problem 3:
    Same problem as in this thread: https://networkcomms.net/forums/topic/exception-in-peerdiscovery-on-android/ There seems to be fix available, how can I get it?

    #2648
    Anonymous
    Inactive

    Heya KPC,

    Welcome to our forums. It sounds like you are having some of the android issues that were fixed in version 3.0.1. If you could give me the email address you used to purchase NetworkComms.Net I will forward you a download link for the updated version.

    Regards,
    Marc

    #2651
    Anonymous
    Inactive

    Hey Marc,

    thanks for your reply. My E-Mail address with the subscription is [deleted] but I could not receive any E-Mail after registering at the forum so I had to use my gmail address. It would be nice if you could delete this post such that the E-Mail address is no longer visible to everyone once you sent me the download link.

    Thanks for your help
    KPC

    • This reply was modified 10 years, 4 months ago by . Reason: deleted email
    #2652
    Anonymous
    Inactive

    Heya KPC,

    I cannot find a purchase using the email address you provided. Could you please forward the gmail address to support@networkcomms.net?

    Regards,
    Marc

    #2654
    Anonymous
    Inactive

    Once you’ve had a chance to try the latest version please post back to let us know if the problems have been solved.

    Regards,
    Marc

    #2655
    Anonymous
    Inactive

    Hi Marc,

    most of the problems have been solved, thanks for that!
    Only problem 1 remains the same. My Android application is not getting the broadcast of my WPF server, only when I send the object directly to the IP address of my device, the message is received. Any ideas on that?

    Here once again some code snippets:
    Working:
    UDPConnection.SendObject("ConnectInformation", connectInformation, new IPEndPoint(IPAddress.Parse("192.168.1.103"), NetworkConstants.Port));
    Not working:
    UDPConnection.SendObject("ConnectInformation", connectInformation, new IPEndPoint(IPAddress.Broadcast, NetworkConstants.Port));
    I tested the same with a simple string – same result. One odd thing I noticed on the server is a socket exception which I get on the server when I sent something, which is a WSAEFAULT 10014 error (The system detected an invalid pointer address in attempting to use a pointer argument of a call). Nevertheless the messages are received on my WPF client (broadcasting as well as specific addresses).

    Regards,
    KPC

    #2673
    Anonymous
    Inactive

    I will have to investigate and get back to you. As far as I remember broadcasts did work when we tested them in android for 3.0.1.

    Regards,
    Marc

    #3425
    Anonymous
    Inactive

    Hi there,

    Any update on this one? I am trying the peer-discovery (broadcasting) messages on Android and I cannot seem to receive anything or discover any other device. I am trying to get an android to discover an iPhone or vice versa, but I am not seeing any packets arriving on Android. Which sounds similar to the issue here.

    Has this been resolved? Is Peer-Discovery working on Android? can somebody confirm please? it would be great if there is any confirmed code snippet. I have used the sample provided (console app) and that worked fine on iOS but no luck on Android so far.

    Thanks in advance

    #3426
    Anonymous
    Inactive

    Heya Has,

    I believe the peer discovery issue has been solved and will be available in the next revision release. We are hoping to include a few other bug fixes in this release as well so it may be another week or so until this is available for general download.

    Regards,
    Marc

    #3431
    Anonymous
    Inactive

    Thanks Marc,

    How would I know about the new release? would you be sending an annoncement to all your subscribers (by email?) ? or will you just put a notice on the website? I cannot see a version no mentioned on the download page.

    Thanks
    Has

Viewing 10 posts - 1 through 10 (of 13 total)
  • You must be logged in to reply to this topic.