Question

I am trying to pipeline some audio over a udp socket on android using eclipse

I keep getting the following error

"The method fromDatagramSocket(DatagramSocket) is undefined for the type ParcelFileDescriptor"

The android docs show that such a method is already available and I believe this is the proper way to create a UDP pipeline

Reference:

http://developer.android.com/reference/android/os/ParcelFileDescriptor.html#fromDatagramSocket(java.net.DatagramSocket)

Code :

DatagramSocket socket = new DatagramSocket(port, InetAddress.getByName(hostnameUDP));
ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket);
Was it helpful?

Solution

The problem was with the included Android Library which was Android 2.2 Changed it to Android 4.3 and it worked Apparently the older version of the Android library did not have UDP defined

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top