GetSupValues

Class category = OrientationRequested.class;
Object o = service.getSupportedAttributeValues(category, null, null);
if (o == null) {
    // Attribute is not supported
} else if (o.getClass() == category) {
    // Attribute value is arbitrary; the actual value in o is irrelevant
} else if (o.getClass().isArray()) {
    // Attribute values are a set of values
    for (int i=0; i<Array.getLength(o); i++) {
        Object v = Array.get(o, i);
        // v is one of the possible values
    }
} else {
    // Attribute value is limited to a range of values represented by o
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.