I have the same problem after upgrading to 1.5 on the device. But this works fine on the emulator.
Regards Goutam On Jun 18, 11:28 am, Jonas Ådahl <jad...@gmail.com> wrote: > Take a look at this bug > report:http://code.google.com/p/android/issues/detail?id=2917 > According to michael.sciscenti the reason is, since Android 1.5 the > Join packet is not sent out. > > Jonas > > On May 19, 4:57 pm, Whino <whino...@gmail.com> wrote: > > > I'm using this code on real device. > > I know there is someone wants to port UPnP stack to Android. > > But I don't know any DLNA application on Android from official or > > other open source project. > > Could you tell me the application name or its info? > > Thank you very much. > > > On May 19, 3:54 pm, Daniel Janev <d.ja...@prosyst.com> wrote: > > > > Hi, > > > > You use the SDK and the emulator or you are trying this code on real > > > device? > > > > As far as I know there is DLNA application for Android, which works on > > > the phone using the WiFi connection. > > > > Whinowrote: > > > > The following is the listen function I used to receivemulticast > > > > packets. > > > > "socket.receive" can not receive packets from remote peer, but it can > > > > receive packets sent from local. > > > > > public static void listen() throws IOException { > > > > Runnable r = new Runnable() { > > > > public void run() { > > > > > while (true) { > > > > try { > > > > MulticastSocket socket = new MulticastSocket > > > > (1900); > > > > Log.v(TAG, "Settingmulticastnetwork > > > > interface: " + ni); > > > > socket.setNetworkInterface(ni); > > > > > socket.setTimeToLive(4); > > > > socket.setReuseAddress(true); > > > > socket.joinGroup(getMulticastAddress()); > > > > while(true) > > > > { > > > > byte[] buf = new byte[1024]; > > > > DatagramPacket packet_r = new > > > > DatagramPacket(buf, buf.length); > > > > socket.receive(packet_r); > > > > String s = new String(packet_r.getData()); > > > > > Log.v(TAG, "Receiving aMulticastfrom [" > > > > + packet_r.getAddress().getHostAddress() + ":" + packet_r.getPort() + > > > > "]"); > > > > Log.v(TAG, "Data: " + s); > > > > > CharSequence data = packet_r.getAddress > > > > ().getHostAddress() + ":" + packet_r.getPort(); > > > > Toast.makeText(view, data, > > > > Toast.LENGTH_SHORT).show(); > > > > } > > > > } catch (IOException e) { > > > > Log.v(TAG, "UPNP network exception", e); > > > > try { > > > > Thread.sleep(1000); > > > > } catch (InterruptedException e1) {} > > > > } > > > > } > > > > > }}; > > > > sListener = new Thread(r); > > > > sListener.start(); > > > > } > > > > -- > > > > Best Regards, > > > Daniel > > > --------------------------------------------------------------- > > > Daniel Janev · Department Manager/Core Platform and Smart Home > > > ProSyst Software GmbH > > > 1606 Sofia, Bulgaria · Vladajska Str. 48 > > > Tel. +359 (0)2 952 35 81/109 · Fax +359 (0)2 953 26 17 > > > Mobile Phone +359 (0)888 678 670http://www.prosyst.com·d.ja...@prosyst.com > > > --------------------------------------------------------------- > > > stay in touch with your product. > > > ---------------------------------------------------------------- Hide > > > quoted text - > > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---