Published ZeroConf Services are not Discoverable on Android React Native But Visible in Bonjour Browser. · Issue #1387 · python-zeroconf/python-zeroconf · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After Registering this service, It is visible on the Bonjour Browser.
My Host is the service name.
but the same is not visible in the react native app using react-native-zeroconf.
React Native Code
/** * Sample React Native App * https://github.com/facebook/react-native * * @format */importReact,{useEffect}from'react';import{SafeAreaView,ScrollView,StatusBar,Text,useColorScheme,View,}from'react-native';importZeroconffrom'react-native-zeroconf';import{Colors}from'react-native/Libraries/NewAppScreen';constzeroconf=newZeroconf();functionApp(): React.JSX.Element{constisDarkMode=useColorScheme()==='dark';constbackgroundStyle={backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,};useEffect(()=>{consthandleStart=()=>console.log('The scan has started.');consthandleFound=name=>console.log('Service found:',name);consthandleResolved=service=>{console.log('Service resolved:',service);// setServices(prevServices => [...prevServices, service]);};consthandleError=err=>console.log('Error:',err);consthandleStop=()=>console.log('The scan has stopped.');zeroconf.on('start',handleStart);zeroconf.on('found',handleFound);zeroconf.on('resolved',handleResolved);zeroconf.on('error',handleError);zeroconf.on('stop',handleStop);// Start the service scansetTimeout(()=>{zeroconf.scan('http','tcp');console.log('Started scanning...');},1000);// Cleanup on component unmountreturn()=>{zeroconf.off('start',handleStart);zeroconf.off('found',handleFound);zeroconf.off('resolved',handleResolved);zeroconf.off('error',handleError);zeroconf.off('stop',handleStop);zeroconf.stop();};},[]);return(<SafeAreaViewstyle={backgroundStyle}><StatusBarbarStyle={isDarkMode ? 'light-content' : 'dark-content'}backgroundColor={backgroundStyle.backgroundColor}/><ScrollViewcontentInsetAdjustmentBehavior="automatic"style={backgroundStyle}><View><Text>MyBetterRNNETWORK</Text></View></ScrollView></SafeAreaView>);}exportdefaultApp;
My WiFi Router's Services are visible in the console but not this one.
Can someone please help me making my zeroconf service discoverable in react native code....
The same is True with nodejs server usng 'bonjour' package.
I have added these permissions in AndroidManifest.xml
Hello Team,
I am a University Student and Working on My Dissertation, I was exploring some libraries to connect to RPi's local Node/Python server.
I am using python to publish a zeroconf service on local network on RPi 4 Model B
After Registering this service, It is visible on the Bonjour Browser.
My Host is the service name.
but the same is not visible in the react native app using react-native-zeroconf.
React Native Code
My WiFi Router's Services are visible in the console but not this one.
Can someone please help me making my zeroconf service discoverable in react native code....
The same is True with nodejs server usng 'bonjour' package.
I have added these permissions in AndroidManifest.xml
@bdraco @PaarthShah @jstasiak @scop @dtantsur @andrewbonney @
The text was updated successfully, but these errors were encountered: