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.
我们正在使用接近传感器来检测手机是否在口袋里(我们的应用程序在后台运行)。但是,我们遇到了一个问题:用户将手机放入口袋(屏幕锁定)后,接近传感器状态始终为假。谁能告诉我屏幕锁定时是否可以获得接近传感器状态?提前致谢!
这在 iOS 上是不可能的。有关iOS 中可能的后台操作的列表,请参阅此处文档中的表 3-1 。