Android Cling UPNP - cannot able to discover Local Devices

1.1k Views Asked by At

I am using cling library to discover android devices on same local network (wifi). For that i have created two Local Device (UDAServiceType = SwitchPower) on two different android phones (PhoneA and PhoneB).

But when i execute this upnpService.getControlPoint().search() on PhoneA it only discover local device for phoneA and My PC Name connected to same wifi (UDAServiceType = MediaPlayer). but it doesn't discover any Local Device on other PhoneB. I have declared two services in my manifest file:

<service android:name="My_Package_Name".BrowserUpnpService"/>
<service android:name="<Library_PCKAGE_NAME>org.teleal.cling.android.AndroidUpnpServiceImpl"/>

Well i think the issue is: instead of creating LOCAL DEVICE and binding it with a LOCAL SERVICE i should create a REMOTE DEVICE and BIND IT WITH REMOTE SERVICE? if yes? then how i can i do that. Also i am following this link Cling on Android.

What i am trying to do is broadcast (IP, deviceName, Port, devicePort, serviceName, deviceType) the device and discover the devices connected to a local network (wifi).

0

There are 0 best solutions below