# Sensor feature control

**Detailed Description**

This section contains APIs related to controlling the features the sensor sub-system offers.

- *group* Telematics\_sensor\_feature\_control

    - - class ISensorFeatureEventListener : public [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[ISDKListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00046.html#_CPPv4N5telux6common12ISDKListenerE)

    - [ISensorFeatureEventListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00634) interface is used to receive notifications related to sensor feature events.

The listener method can be invoked from multiple different threads. Client needs to make sure that implementation is thread-safe.

Public Functions

- inline virtual void onEvent([SensorFeatureEvent](https://docs.qualcomm.com/doc/80-PF458-10/topic/struct_a00632.html#_CPPv4N5telux6sensor18SensorFeatureEventE) event)

    - This function is called to notify about sensor feature events

On platforms with Access control enabled, the client needs to have TELUX\_SENSOR\_FEATURE\_CONTROL permission for this listener API to be invoked.

- Parameters:

    - **event** – **[in]** - The sensor feature event [telux::sensor::SensorFeatureEvent](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00632) that got triggered

- inline virtual void onBufferedEvent(std::string sensorName, std::shared\_ptr&lt;std::vector&lt;[SensorEvent](https://docs.qualcomm.com/doc/80-PF458-10/topic/struct_a00630.html#_CPPv4N5telux6sensor11SensorEventE)&gt;&gt; events, bool isLast)

    - This function is called to notify about available sensor events that caused one or more sensor feature events [SensorFeatureEvent](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00632) to occur.

The sensor events that occurred when the apps processor was in sleep mode and triggered the sensor feature to occur will be buffered and delivered using this method.

In case a sensor event occurs when the system is active, this listener is not invoked. In this case, the required sensor data that triggered the feature can be obtained from the [telux::sensor::ISensorEventListener::onEvent](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00623_1ab357afb7ab27fb33b127f3f093bc7c5c) listener interface.

Note the following constraints on this listener API It shall not perform time consuming (compute or I/O intensive) operations on this thread It shall not inovke an sensor APIs on this thread due to the underlying concurrency model

On platforms with Access control enabled, the client needs to have TELUX\_SENSOR\_FEATURE\_CONTROL permission for this listener API to be invoked.

Multiple [telux::sensor::SensorFeature](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00631) can be enabled using telux::sensor::enableFeature, whose notification will be delivered in sequence. isLast will be set to true to signify last event of a [SensorFeature](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00631).

- Parameters:

    - - **sensorName** – **[in]** - The name of the sensor that generated the buffered events
- **events** – **[in]** - List of sensor events
- **isLast** – **[in]** - Indicate if this is last notification for the buffered events.

- inline virtual ~ISensorFeatureEventListener()

    - The destructor for the sensor feature event listener

- class ISensorFeatureManager

    - Sensor Feature Manager class provides APIs to interact with the sensor framework to list the available features, enable them or disable them. The availability of sensor features depends on the capabilities of the underlying hardware.

Public Functions

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[ServiceStatus](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common13ServiceStatusE) getServiceStatus() = 0

    - Checks the status of sensor sub-system and returns the result.

- Returns:

    - the status of sensor sub-system status [telux::common::ServiceStatus](https://docs.qualcomm.com/doc/80-PF458-10/topic/enum_a00023_1ga7063b4a1071b6581022e30b730684e4d.html#a00023_1ga7063b4a1071b6581022e30b730684e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) getAvailableFeatures(std::vector&lt;[SensorFeature](https://docs.qualcomm.com/doc/80-PF458-10/topic/struct_a00631.html#_CPPv4N5telux6sensor13SensorFeatureE)&gt; &features) = 0

    - Request the sensor framework to provide the available features. The feature could be offered by the sensor framework or the underlying hardware.

- Parameters:

    - **features** – **[out]** List of sensor features the sensor framework offers

- Returns:

    - status of the request [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) enableFeature(std::string name) = 0

    - Enable the requested feature.

Enabling a sensor feature when the system is active would additionally require enabling the corresponding sensor which is used by the sensor feature. For instance, if the sensor feature uses the accelerometer data, in addition to calling this method, the [telux::sensor::ISensorClient::activate](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00625_1a27d8de591ab7adfe4fe25fb96f182698) should also be invoked for the required sensor, in this case, the accelerometer.

If the sensor feature only needs to be enabled during suspend mode, just enabling the sensor feature using this method would be sufficient. The underlying framework would take care to enable the required sensor when the system is about to enter suspend state.

On platforms with Access control enabled, Caller needs to have TELUX\_SENSOR\_FEATURE\_CONTROL permission to invoke this API successfully.

- Parameters:

    - **name** – **[in]** The name of the feature to be enabled. Enabling an already enabled feature would result in the API returning telux::common::Status::SUCCESS.

- Returns:

    - status of the request [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) disableFeature(std::string name) = 0

    - Disable the requested feature

- Parameters:

    - **name** – **[in]** The name of the feature to be disabled. Disabling an already disabled feature would result in the API returning telux::common::Status::SUCCESS. On platforms with Access control enabled, Caller needs to have TELUX\_SENSOR\_FEATURE\_CONTROL permission to invoke this API successfully.

- Returns:

    - status of the request [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) registerListener(std::weak\_ptr&lt;[ISensorFeatureEventListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00634.html#_CPPv4N5telux6sensor27ISensorFeatureEventListenerE)&gt; listener) = 0

    - Register a listener for sensor feature related events

- Returns:

    - status of registration request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#_CPPv4N5telux6common6StatusE) deregisterListener(std::weak\_ptr&lt;[ISensorFeatureEventListener](https://docs.qualcomm.com/doc/80-PF458-10/topic/class_a00634.html#_CPPv4N5telux6sensor27ISensorFeatureEventListenerE)&gt; listener) = 0

    - Deregister a sensor feature event listener

- Returns:

    - status of deregistration request - [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-10/topic/enum_a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00023_1ga45eeeff7c2860e02ae447d588d3d6e4d)

- inline virtual ~ISensorFeatureManager()

    - Destructor for [ISensorFeatureManager](https://docs.qualcomm.com/doc/80-PF458-10/topic/common.html#a00635)

Last Published: Mar 31, 2026

[Previous Topic
telux::sensor::ISensorManager](https://docs.qualcomm.com/bundle/publicresource/80-PF458-10/topics/sensor_control.md) [Next Topic
Telephony](https://docs.qualcomm.com/bundle/publicresource/80-PF458-10/topics/telephony.md)