Cling FAQ
General Questions
- Which version of the UPnP specification does Cling implement?
-
Cling Core is compatible with the UPnP Device Architecture 1.0.
- Can I use Cling to access a UPnP/DLNA MediaServer in Android?
-
Yes, you can write a control point application for Android with Cling Core as a UPnP library. You can find additional utilities for browsing and parsing a MediaServer content directory in the Cling Support module.
- Can I use Cling in my commercial application or device?
-
Cling is licensed under the LGPL, so there are no restrictions on the use of the unmodified Cling JAR files/binaries. You can use the unmodified JAR files/binaries in any application or device, for any purpose. The following distribution (for free or for pay) restrictions apply:
- If you distribute Cling with your application or device, you have to include a notice like "contains LGPL software" and a link to the Cling homepage, so your users also get the benefit of Free Software.
- You have to allow replacement of the Cling library in your distributed application. This means replacement of the JAR file (e.g. in a WAR or EAR package) or replacement of Cling .class files in the Android APK package (dex2jar). You can not lock your distribution package with any kind of obfuscation or DRM scheme.
- If you modify Cling source code, and you distribute a binary compiled from this modified source code, you have to distribute your changed source code as well under the LGPL (upon request). Typically this means you contribute your changes back to the Cling project, to be included in an official Cling release.
Contact us if you have questions about the licensing of Cling.
Technical Questions
- What are the dependencies of Cling Core?
-
Cling Core is distributed as a single JAR file. It only has one other dependency, the seamless-*.jar files. All these JAR files are typically packaged next to each other in the ZIP distribution. You have to add them to your classpath.
- How can I access the services of a device?
-
First write a control point and a RegistryListener as explained in the manual. Then call device.getServices() when a device has been discovered.
- Cling doesn't work if I start my application on Tomcat/JBoss/Glassfish/etc?!
-
You'll get an error on startup, this error tells you that Cling couldn't use the Java JDK's HTTPURLConnection for HTTP client operations. This is an old and badly designed part of the JDK: Only "one application" in the whole JVM can configure it. You have to switch Cling to an alternative HTTP client, e.g. the other bundled implementation based on Apache HTTP Core. This is explained in more detail in the user manual.
- Is IPv6 supported?
-
No, the default configuration of the UPnP stack in Cling Core will filter all network interfaces and IP addresses that are not IPv4. Some other parts of the Cling Core library might also assume that addresses are IPv4 and the whole library has not been tested in an IPv6 only environment. You are welcome to test Cling on IPv6 with a custom UpnpServiceConfiguration and NetworkAddressFactory and contribute back any necessary changes.
- I don't see debug log messages on Android?
-
The java.util.logging implementation on Android is broken, it does not allow you to print debug-level messages easily. See this discussion for a simple solution.

