The official Pokemon GO Twitter account has announced that the Adventure Sync feature is now available to all level 40 trainers. The Adventure Sync feature, which records actions in the background and counts your steps and catch eggs etc, will be rolled out to more trainers in due course. You can read more about the feature here.
“Adventure Sync is an optional mode that will allow you to record your kilometers traveled even when the Pokémon GO app isn’t open. You’ll be able to stay active and earn Buddy Candy or hatch Eggs without significantly impacting your device’s battery life. When your Buddy Pokémon has found Candy or when an Egg is about to hatch, you can enable to receive a push notification. As an added bonus, you’ll get weekly fitness reports to track your progress as well as earn rewards for reaching weekly milestones. Note: Adventure Sync is only available for Trainer Levels 5 and above.”