Android Unlocking/locking depending on accelerometer/gyroscope

Hello there
Im newbie in Unreal Engine. I started with easy application where I put my model and watching it with using gyroscope. Overall everything working properly except one thing. Is there any possible way to make smartphone go dark after its not moving for example 10 seconds, but after any movemement of gyroscope/accelerometer (no matter which one) it unlocks or wake up? I tried use android Automate software, but its generating lots of back process which leads to freezing phone. Is there anyway to make this inside unreal?