Hi, the map of properties is exposed with the `getValues()` method: Source: https://github.com/iotivity/iotivity/blob/master/android/android_api/base/src/main/java/org/iotivity/base/OcRepresentation.java#L56 Patch that introduced it: https://github.com/iotivity/iotivity/commit/cc27dd143241c0e522ab0e11624411408eb5f9e9 Example usage: https://github.com/siovene/cordova-plugin-ocf/blob/master/src/android/OcfBackendIotivity.java#L77
Hope this helps! Salvatore On Wed, Aug 31, 2016 at 2:10 PM, Max Kholmyansky <max001 at gmail.com> wrote: > Hi > > A technical question about resource attributes. > > Is there any way to get the list of the attributes obtained from a resource, > without knowing in advance the attributes' names? > > I am using IoTivity Java API on Android. > > My scenario: > 1. Call to OcResource.get() > 2. In the OcResource.OnGetListener callback, get the OcRepresentation object > 3. Unfortunately, the OcRepresentation documentation provides APIs to > retrieve attributes (keys) values per specific name - no iteration or > getAll(). > > Clearly, this option is not hidden by the OCF protocol itself (OCF simulator > client shows all the attributes without prior knowledge) - any way to do it > in IoTivity? > > Thanks > > Max. > > Software Architect - Tekoia Ltd. > > > > _______________________________________________ > iotivity-dev mailing list > iotivity-dev at lists.iotivity.org > https://lists.iotivity.org/mailman/listinfo/iotivity-dev > -- Salvatore Iovene <salvatore.iovene at intel.com> Linux Software Engineer Intel Open Source Technology Center, Finland Tel.: +358504804026
