Does Android 2.2 media support IGMP / Multicast? If so, can someone explain how we can do this?
It is pretty simple:
Tell wifimanager that your application should receive multicast:
WifiManager wifi = (WifiManager)getSystemService( Context.WIFI_SERVICE ); MulticastLock mcLock = wifi.createMulticastLock("mylock"); mcLock.acquire();
Create a socket:
InetAddress group = InetAddress.getByName(MULTICAST_ADDRESS); MulticastSocket s = new MulticastSocket(MULTICAST_PORT); s.joinGroup(group);
Android multicast support doesn't seem to be as reliable as some of them might hope. See http://codeisland.org/2012/udp-multicast-on-android/
That is, whether it really works or may be device dependent. It does not work on my Nexus5.
https://code.google.com/p/android/issues/detail?id=51195
Source: https://habr.com/ru/post/1765613/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1765608/encoding-guidelines-to-avoid-issues-with-streams&usg=ALkJrhjsjnSvhLTjkTLWuCZc4jNkNSb0bQZend Cache - problem with deleting cache files - phpКак использовать строго типизированный словарь, чтобы связать строку с классом - c#IronPython ->. Exe Executable and distributed with all DLL HELP files - .netAny good sites for learning Delphi? - delphiJSF Authentication - javaJw player size not suitable for video resolution - jwplayerRunning two projects (trunk and branch) simultaneously in Eclipse - javaA command line tool that replaces the .manifest file - manifestИзменить заголовок заголовка заголовка таблицы заголовка devexpress - c#All Articles