react-native getting the list of devices with ip and name in the local network

1.3k Views Asked by At

I am trying to create a react native app, which is a virtual TV remote app. I want to get the list of devices connected to my network (specifically my TV) and connect to it.

Is there a way I can get this using react native? or I will need to set up a backend server which will do that?

Stuck!!! If someone has done this previously please help.

https://www.npmjs.com/package/local-devices

This runs on node js, I am not sure how to run nodejs locally on react native app.

https://www.npmjs.com/package/react-native-find-local-devices There is this one but it says it only supports for Android.

1

There are 1 best solutions below

0
Jace On

I suppose you are wanting to target multiple native devices, since it seems the Android-only package you are aware of is insufficient. You could try leveraging the react-native-ssdp package to let a client search the network for devices. You can see an example of how to search across all devices on the network in the line client.search('ssdp:all'); from the README within the repository https://github.com/netbeast/react-native-ssdp.