Domanda

I'm implementing a control point with Cling for Android and in one of my activities I need to know the value of a state variable offered by the host. The state variable value is set when the host is started and does not change unless the host is restarted.

How can I get the current value of the state variable? AFAIK the documentation only explains how to subscribe to state variable events, which I can't use because the variable doesn't fire any. Or maybe I should just write a UPnP action to retrieve the value?

È stato utile?

Soluzione

There is a QueryStateVariable action in very early UPnP specs but it was deprecated and current spec does not allow control points to use it, and service developers must define variable-specific query actions.

If the service you work with is very old (I believe pre-1.0), then you might still have to use that method, but please check first if there are proper variable-specific methods first. I'm not too familiar with Cling, but it does seem to have a QueryStateVariableAction.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top