We have been trying to write a rtsp streaming client for Android
platform in Eclispe.
we are able to do the handshaking, i.e Describe, Setup, Play requests
have been sucessfully communicated.
Now i have chosen to receive the Multicast UDP data packets after PLAY
command.
The problem is that I am unable to receive the UDP multicast data...in
the emulator as well as Android device, but am able to receive the UDP
packets in a java based app and a .Net based app.
wifi =
(WifiManager) getSystemService(getApplicationContext().WIFI_SERVICE);
mLock =
wifi.createMulticastLock("mylock");
mLock.setReferenceCounted(true);
mLock.acquire();
MulticastSocket
sock;
InetAddress sessAddr =
InetAddress.getByName("234.2.128.12");
sock = new
MulticastSocket(1100); //
48180);
byte b = 64;
sock.setTTL(b);
sock.joinGroup(sessAddr);
byte[] byData = new
byte[500];
DatagramPacket pack = new
DatagramPacket(byData, 500);
sock.receive(pack);
Plus i have added the following tags to the manifest
<uses-permission android:name="android.permission.INTERNET" /
>
<uses-permission
android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /
>
The program gets stuck on the receive statement.
Pls suggest.
Best Regards
Jasleen
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en