Search Unity

NetworkDiscovery not working on Android

Discussion in 'Multiplayer' started by sebrk_hiq, Sep 1, 2017.

  1. sebrk_hiq

    sebrk_hiq

    Joined:
    Jul 10, 2017
    Posts:
    23
    I have a Hololens that I want to control with a simple Android app. All my code works fine in Hololens and in Editor. I can see packets being sent out from the Hololens but the Android phone (Samsung Galaxy S7) will not listen for incoming traffic. It does work to SEND though, but I need it to listen.

    I can see no exceptions or errors in logcat. And I have the INTERNET permission in the manifest.

    Anyone knows what is up? I should be able to open ports and listen to incoming traffic right?

    I'm using 2017.1.0.p5 btw.
     
  2. sebrk_hiq

    sebrk_hiq

    Joined:
    Jul 10, 2017
    Posts:
    23
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Afaik, NetworkDiscovery is broken in default HLAPI. Try using HLAPI Pro instead.
     
  4. sebrk_hiq

    sebrk_hiq

    Joined:
    Jul 10, 2017
    Posts:
    23
    What does this mean? Pro License? Or is that some special package?

    I do have the Pro License if that is what you mean.
     
  5. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
  6. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    Note: that local discovery will work only if your android device and desktop will belong to the same subnet. Firewall rules can prohibit this too. So, (1) check if it works on two different desktops and (2) check if android device connected to the same network (sometimes, your desktop connects to home router via ethernet and android via wifi in this case you should check that wifi and ethernet port belongs to the same net, and broadcasting between them is allowed)