bryan-y88 / Musics_Around

Android Wireless Surround Sound App
27 stars 23 forks source link

Not able to listen music on other device #1

Open krishnameena opened 7 years ago

krishnameena commented 7 years ago

I am able to connect both the devices but music is not playing in the other device.

I am getting this error

2-11 20:04:29.711 26520-32210/com.example.musicsaround D/ClientSocketHandler: Socket connection has ended.
                                                                               java.net.SocketException: recvfrom failed: ETIMEDOUT (Connection timed out)
                                                                                   at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:592)
                                                                                   at libcore.io.IoBridge.recvfrom(IoBridge.java:556)
                                                                                   at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
                                                                                   at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
                                                                                   at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
                                                                                   at java.io.InputStream.read(InputStream.java:162)
                                                                                   at com.example.musicsaround.speaker.ClientSocketHandler.run(ClientSocketHandler.java:69)
                                                                                Caused by: android.system.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out)
                                                                                   at libcore.io.Posix.recvfromBytes(Native Method)
                                                                                   at libcore.io.Posix.recvfrom(Posix.java:185)
                                                                                   at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250)
                                                                                   at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
                                                                                   at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485) 
                                                                                   at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) 
                                                                                   at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) 
                                                                                   at java.io.InputStream.read(InputStream.java:162) 
                                                                                   at com.example.musicsaround.speaker.ClientSocketHandler.run(ClientSocketHandler.java:69) 
bryan-y88 commented 7 years ago

Hi Krishna, thank you for your interest. However, I no longer support this project as it has been years since the development, and android has gone through many versions, and the devices I tested were first gen of nexus 7's.

Just by glancing over the error message. I'd say start by looking at why the socket connection timed out. Are both devices on the same local area network? Is there a firewall? Are there port usage restrictions? Also I would check the code and make sure both devices can connect and send over simple string commands.

-- Best Regards, Bryan Yan

On Feb 11, 2017, at 9:36 AM, Krishna Meena notifications@github.com wrote:

I am able to connect both the devices but music is not playing in the other device.

I am getting this error

2-11 20:04:29.711 26520-32210/com.example.musicsaround D/ClientSocketHandler: Socket connection has ended. java.net.SocketException: recvfrom failed: ETIMEDOUT (Connection timed out) at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:592) at libcore.io.IoBridge.recvfrom(IoBridge.java:556) at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485) at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) at java.io.InputStream.read(InputStream.java:162) at com.example.musicsaround.speaker.ClientSocketHandler.run(ClientSocketHandler.java:69) Caused by: android.system.ErrnoException: recvfrom failed: ETIMEDOUT (Connection timed out) at libcore.io.Posix.recvfromBytes(Native Method) at libcore.io.Posix.recvfrom(Posix.java:185) at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250) at libcore.io.IoBridge.recvfrom(IoBridge.java:553) at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485) at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) at java.io.InputStream.read(InputStream.java:162) at com.example.musicsaround.speaker.ClientSocketHandler.run(ClientSocketHandler.java:69)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

manujvashist commented 7 years ago

One reason can be your phone's don't support NFC which is used in app to share the music. Bryan can you update this project once again please.

bryan-y88 commented 7 years ago

It's not NFC, it's Wifi Direct. https://developer.android.com/guide/topics/connectivity/wifip2p.html

krishnameena commented 7 years ago

My phone is supported NFC and WiFi Direct both, should I need to change something in the code?

krishnameena commented 7 years ago

any update for me ?

manujvashist commented 7 years ago

I have resolved all the errors I'll upload the code soon on github .

krishnameena commented 7 years ago

Thank you so much! I am waiting..

krishnameena commented 7 years ago

@manujvashist any update for me ?

jasmeetsinghlotey commented 7 years ago

i also need working demo of this project, I think it has missing classes.

krishnameena commented 7 years ago

Did you get working demo of this project ?

manujvashist commented 7 years ago

yes!! see in my repositories. do star the repo and try to contribute to it.

iFruit commented 7 years ago

@manujvashist cannot find any demo from musics_around in your github profile!

ranaparamveer commented 6 years ago

@manujvashist You got any working demo of the project?