title: Does Android's RTP library support multicast?
body: <p>I am trying to multicast an audio stream from one device to many others using Android's RTP classes.</p>
  
  <p>I <em>do not</em> want to use any third party libraries if at all possible.</p>
  
  <p>I am able to stream two way audio between two devices using <code>AudioStream</code> and <code>AudioGroup</code> set up with each other's IP addresses, but I would like to stream to a multicast group.</p>
  
  <p>If I try to instantiate the <code>AudioStream</code> with a multicast address such as <code>239.1.1.1</code> and then, on the other device use <code>audioStream.associate()</code> with the same multicast address, but the streams are not heard.</p>
  
  <p>I have read about some Android devices not supporting multicast, but my devices (both Samsung Galaxy Tab 2s) do support it. I have even added the following to my code to try to obtain a multicast lock:</p>
  
  <pre><code>WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
              multicastLock = wifi.createMulticastLock("multicastLock");
              multicastLock.setReferenceCounted(true);
              multicastLock.acquire();
  </code></pre>
  
  <p>Additionally I have the following permissions in my manifest file:</p>
  
  <pre><code>   &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
     &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
     &lt;uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /&gt;
     &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
     &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
  </code></pre>