Search DLNA(Upnp) media renderers for remoteplayback
-
15-04-2021 - |
문제
I am trying to write a DLNA application using the Cling Java library. I Can able to search all the media servers in the DLNA network and play the content also. But i need to search Media Renderers available in the network and play the content on them. Just like UPnPlay does.
Thanks in advance.
해결책
public class MyUpnpService extends AndroidUpnpServiceImpl {
@Override
protected AndroidUpnpServiceConfiguration createConfiguration(WifiManager wifiManager) {
return new AndroidUpnpServiceConfiguration(wifiManager) {
@Override
public ServiceType[] getExclusiveServiceTypes() {
return new ServiceType[] {
new UDAServiceType("AVTransport")
};
}
};
}
}
Searching for devices with "AVTransport service" capability solved the issue of searching for Media renderers for remote playback. For remote playback i found enough documnetation from this
제휴하지 않습니다 StackOverflow