How to implement background location and fetch services

I tried to use in the managed flow fetch-background and location background methods with task manager and it didn’t work well. I’m using expo sdk40.