Android emulator and Cling core

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Android emulator and Cling core

James_Carr
Hi!
As a new android programmer, i'd need some explanation about Cling core. I try to follow the instructions in the android and Cling part of the user manual. I created service and activities as directed. Also, my computer is connected to an ethernet network. When I launch the application, no sign appears on the emulator. I thought about two possibilities:
  - The problem is that my emulator couldn't cacht any wi-fi packet cause I'm on ethernet network
  - or the code in the manual is uncompleted and I have to complete.
I just want to detect and display devices of my network. Thanks for help.
Reply | Threaded
Open this post in threaded view
|

Re: Android emulator and Cling core

Christian Bauer
Administrator
The Android emulator does not support multicast. Since this is required for discovery, you have to run UPnP applications on real devices, not in the emulator. Or you fake/mock the device discovery step during testing on the emulator (e.g. by registering a mock LocalDevice on the Registry).
Reply | Threaded
Open this post in threaded view
|

Re: Android emulator and Cling core

Michael Pujos
Discovery works in the emulator with a froyo (2.2) image. As the emulator is slow, I suggest you only keep the UPnP device you want to work with on your LAN.
Reply | Threaded
Open this post in threaded view
|

Re: Android emulator and Cling core

Christian Bauer
Administrator
The emulator will send (multicast) UDP datagrams. It will not receive multicast datagrams. What this means is that discovery works halfway.

You will be able to send a multicast UPnP search and receive UDP unicast responses, therefore discover existing running devices.

You will not discover devices which have been turned on after your search, and you will not receive any message when a device is switched off. Other control points on your network will not discover your local Android device/services at all.

All of this can be confusing when testing your application, so unless you really understand what works and what doesn't, you might want to use a real device instead.