Getting sensor uri, enum, privileges

Getting sensor uri, enum, privileges

BY 18 Jan 2021 Native Application Development

(NOT SPAM! hopefully someone wil see this as such and actually read it, and maybe even respond).

 

I am working with several sensors (on Gear xxx). When trying to get this info, I find that I can’t get it all using only one piece of information.

 

For instance, I have either the uri for the sensor http://tizen.org/sensor/healthinfo/heart_rate_monitor , or its enum value SENSOR_HRM – but not both. I now need to know what privilege is needed, ie: http://tizen.org/privilege/healthinfo.

Maybe something like:

sensor_type_s EnumFromURI(const char* uri);
const char *URIFromEnum(sensor_type_s s);

// assuming one or both of the above are available:

const char* str_privilege_needed(sensor_type_s s);

It is basically that I am lazy, having to specify in my code all of these explicity.

 

TIA

 

ken

 

Written by