I want to be able to send music to sonos using its API. Unfortunately the only way I know is to send an URI
to the device so it can download it.
I have visited already the package react-native-httpserver. This one has not been tested in Android. So I had a look over Android's nanoHTTPD and other similar packages in iOS as CocoaHTTPServer is.
It should not very difficult to create a wrapper over those packages to build something cross-platform but I wonder if there is another solution in Javascript or some work developing over react-native-tcp
I want to be able to send music to sonos using its API. Unfortunately the only way I know is to send an URI
to the device so it can download it.
I have visited already the package react-native-httpserver. This one has not been tested in Android. So I had a look over Android's nanoHTTPD and other similar packages in iOS as CocoaHTTPServer is.
It should not very difficult to create a wrapper over those packages to build something cross-platform but I wonder if there is another solution in Javascript or some work developing over react-native-tcp
Share Improve this question edited May 23, 2017 at 12:17 CommunityBot 11 silver badge asked Sep 15, 2016 at 15:49 jsdariojsdario 6,85311 gold badges44 silver badges78 bronze badges3 Answers
Reset to default 15I'll answer my own question, time has passed by and some packages have been released. Even with limitations, but looks promising so far:
- HTTP Static server: https://github./futurepress/react-native-static-server
- Quite flexible (but Android only) https://www.npmjs./package/react-native-http-server
- Limited but both platforms https://github./alwx/react-native-http-bridge
For those of you still looking for a good package to open a HTTP server in react native, react-native-http-bridge
is unmaintained, but there is a maintained version:
- react-native-http-bridge-refurbished: https://github./Alwinator/react-native-http-bridge-refurbished
Try to use react-native-fetch-blob
https://github./wkh237/react-native-fetch-blob, I have used it to send pictures and It works very well. It supports both ios
and Android