2 Replies Latest reply on Aug 17, 2016 1:24 PM by timkimtimkim

    PhoneGap Developer App not supporting zeroconf plugin

    marcink35007103

      Hi

       

      I am trying to develop PhoneGap application which uses zeroconf plugin for cordova. I Have followed intructions from:

       

      cordova-plugin-zeroconf

       

      My code looks like:

       

      <script type="text/javascript">

         function onDeviceReady() {

              document.getElementById("zeroconf2").innerHTML = "Looking for Domo Device...";

              var ZeroConf = cordova.plugins.zeroconf;

              console.log(ZeroConf);

              ZeroConf.watch('_mpd._tcp.', function(resp){

                  document.getElementById("zeroconf2").innerHTML = resp.service;

                  console.log("Found something");

              });

          }

          function onLoad() {

              document.addEventListener("deviceready", onDeviceReady, false);

          }

          onLoad();

        </script>

      I have added plugin to config.xml:

      <gap:plugin name="cordova-plugin-zeroconf" source="npm"/>

       

      When I am previewing my app on device. I am not able to receive any information regarding _mpd._tcp devices in my network.

      In same time  I am able to see them using zeronf browser, so I know that zeroconf is working in my lan.

       

      BR Marcin