So basically what I want is to have a "host" be able to receive a stream of songs sent by other users over wifi. I'm wondering if you're able to send song audio files through a byte stream or if I'm better off to just use song names sent as strings. I'm pretty new to android dev so anything helps. Thanks!
Asked
Active
Viewed 41 times
0
-
Both options are viable, solution will depend on what is it you actually want: send files or send their names. – M. Prokhorov Mar 16 '17 at 16:33
-
So say if I send a song to another device, the device that receives it can play the audio file? – Caleb lee Mar 16 '17 at 16:34
-
Sending things is ultimately just a bunch of bytes. It can, of course, be done. However, as you said, you're very new and based on your question, I would not recommend you try to do this. Actually streaming the data on the receiving end will be challenging. Start by just sending the data to the client (You said host... the server is the Android device, client is whatever receives the music.) and trying to do something with it. Something like a string. Then try to send something more complicated, like an MP3, all at once. Then tackle streaming live. – Christopher Schneider Mar 16 '17 at 16:43
-
Almost any file can be accessed remotely from another device (ones that don't you don't have OS permission to expose, and usually that is solved by obtaining a permit). Also check out some articles on Streaming Media - for slightly more high level and optimizes solutions. – M. Prokhorov Mar 16 '17 at 16:45
-
Thank you! To clarify I'm not looking to stream data from one phone to another, I'm looking to create a feed/library of songs that the host device receives so they can play or skip the songs, I apologize if I worded the question incorrectly to make it seem like I'm streaming data, but thank you again for the help! – Caleb lee Mar 17 '17 at 17:24