Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用计步器来计算用户的步数,当应用程序启动时我创建流并开始收听,但是当应用程序关闭时,它会停止收听并计算步数。所以我想要一种方法来始终计算应用程序是在前台、后台还是终止的步骤。