App on Background

Hello everyone, sorry, I was looking, if possible, for an advice for a small application that I made, I created a pedometer which, however, must also work in Backgroun, does anyone know how I can solve it? Thanks anyway to everyone, hello and good luck to all

Please search the forum instead of spamming it as most queries, such as yours, already have a solution.