Fix broadcast discovery in Android

On Android and potencially other mobile platforms, WiFi drivers are configured
  by default to discard any packet that is not directed to the unicast mac
  address of the interface, this way they could save some battery but breaks
  anything that is not unicast, such as broadcast discovery. To solve this
  problem On such platforms provide methods to handle low level multicast
  listening so we can receive advertisement from same broadcast domain nodes.
This commit is contained in:
Gioacchino Mazzurco 2019-10-19 10:53:04 +02:00
parent 48267eb659
commit 7f2bfae104
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
4 changed files with 180 additions and 3 deletions

View file

@ -85,4 +85,8 @@
<!-- Added by G10h4ck: Needed permission for network usage -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Added by G10h4ck: Needed to listen for multicast packets, needed for
! broadcast discovery -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
</manifest>