Closed yamatakau08 closed 2 years ago
Those tags are not a UPnP standard, an extension of the device manufacturer.
If it has the same structure as the standard tag, getValue can get the value, but apparently the structure is different, so it is impossible.
By the way, your getValue argument is wrong. You should delete the namespace or specify the namespace URI.
getValue("X_FOO_DeviceInfo")
or getValue("urn:schemas-foo-com:av", "X_FOO_DeviceInfo")
However, since it returns textcontent, I think the return value is blank.
I appreciate your strong support.
I revise the code to Device.getValue(“X_FOO_DeviceInfo”) you suggested from Device.getValue(“av:X_FOO_DeviceInfo”) It returns the following data seems to be what I wanted.
2022-01-08 16:57:40.945 26881-26881/com.example.myaudioremote I/X_FOO_DeviceInfo: 1,2
12345
123456
But getValue("urn:schemas-foo-com:av", "X_FOO_DeviceInfo") has an error about 2nd argument Android Studio pointed out in source window.
Since I get the value what I want, I close this question.
I got to find Device.description returns the xml string and confirmed that api returns whole xml string,
To get the \...</av:X_FOO_DeviceInfo> block in the following xml which Device.description returns,
I called Device.getValue(“av:X_FOO_DeviceInfo”) ,
but returns NULL .
Is there any way to get \<av:X_FOO_DeviceInfo”> block or \ TWO blocks directly with supported API of mmupnp?
OR should I parse that with any XML parse library by myself?