Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing socket bind #16

Open
yetanotherjohn opened this issue Nov 21, 2018 · 3 comments
Open

Missing socket bind #16

yetanotherjohn opened this issue Nov 21, 2018 · 3 comments

Comments

@yetanotherjohn
Copy link

Known Android behavior: if connected WiFi doesn't have internet then network traffic is sent to a connection that does (cellular).

Issue: This plugin hangs if connected to a WiFi network that Android decided doesn't have internet.

Solution:

  1. Bind the multicast socket to a ConnectionManager.TYPE_WIFI network device.
  2. Add a break statement to the while(true) {} loop in the search function.

I have edited the plugin locally to make it work for me. I don't have the capacity to do rigorous platform testing. I'll share the file if there is interest.

@bdirito
Copy link

bdirito commented Nov 19, 2019

Could you provide your changes?

@NBroomfield
Copy link

@yetanotherjohn I'd be very interested in these changes too, my Ionic app keeps crashing, I'm guessing it's probably the same issue.

@yetanotherjohn
Copy link
Author

I did not maintain the change set listed above. Given no interest was expressed for a year, and only then again 3.5 years...

The only crash I experienced with this plugin on Android was due to the one while (true) {} loop. It is easy to find and write a break statement for even without prior Java knowledge. In my experience, any other crash would be integrator's error.

For what it's worth, in my experience the iOS portion of this plugin has never had a crashing, network connectivity, or packet loss issue. It's a good litmus test for your work.

Due to problems with the Android network stack and changes to their API over time I re-wrote the entire Android portion of the SSDP plugin from scratch. I am not at liberty to share. As of a year ago, it seemed to be just a fact that Android will drop packets, never getting them to the Java plugin. This was observed over multiple vendors and hardware generations using packet sniffers and automating test runs. It appears to be an Android issue and my attempts to address it with them were flatly ignored.

Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants