GetInputMotionState returning all 0 values for some devices. Error : Sensor or Listener is null

Hello, I am trying to use the motion sensors on android for my game. I have setup a simple blueprint to print the values of the 4 outputs of the GetInputMotionState function as shown in the image:

I then packaged the game for android ATC and deployed it on my device (OnePlus One) and all values are giving correct outputs, however when tested on Moto G5 Plus and Moto G5 S Plus, all the values were returned as 0. In the adb logcat output the following error is seen;

SensorManager: sensor or listener is null

It seems that for these 2 devices, the values are all 0 because UE is unable to initialize/register the sensors correctly.

In the android build configurations, WRITE_EXTERNAL_STORAGE is the only additional permission, MinSDK level = 16, target SDK level = 22. VR Plugins have been disabled as the game does not require them.

Are there additional settings required to make the motion input work (permissions, additional function calls) ? Have I missed something here ? Please assist.

Thank you,

Kaartikey

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

Hello,
Thank you for the link. I have logged a bug using the Bug Submission Form. It is possible that there is a workaround for this issue or that I have done an incorrect implementation so I’d like to keep this thread open for answers from the community.

Thanks

Hello, Im having the same problem with the same device: Moto G5 Plus with Unreal 4.20.3. It’s the first time I work with this on Unreal, so I’m not sure if those were supposed to be working already and I only have this device for testing at the moment