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.
似乎这个类不是公共的,我必须访问这个类中的 TELEPHONY_STATUS 变量,因为我在 android 源代码中看到,考虑到你使用的 api 版本,值可以改变。
从 android-developer 邮件列表中 阅读这篇文章。android.provider.Telephony是开源版本的一部分,但从未包含在官方 SDK 中。
android.provider.Telephony
您可以查看它以了解系统的工作原理,但您实际上无法在应用程序中使用它。
正如帖子中所说,
不,它不会出现在 SDK 中,这意味着您不应该尝试在您的应用程序中使用它。