How do you make app run in the background on minimize?

I'm using ActivityLifecycle by @Anke , this extension is great. but i don't know how to use it with AccelerometerSensor.Shaking. I'm new to this kindly help me.

You could try the itoo extension

Read the complete thread, try the examples to learn how the extension works, then try to use it together with the accelerometer sensor

Taifun

Thank you @Taifun , m using your extension from many years.
I tried to understand Itoo bg tasks, but its more complex for me.