How can I read sensor data when the display is off?

How can I read sensor data when the display is off?

BY 13 Apr 2019 Native Application Development

I am trying to read sensor data in the background.

The device I am using it Galaxy Watch Active.

I expected that native application run in the background even if the display is off, however the sensor callback is not invoked, if the screen is out.

How can I get sensor data while the display is off?

FYI, I am not planning to upload my app to app store.

I am using it for collecting data.

Written by