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.
您需要的设置来自 android.provider 包中的 Settings.Secure.NETWORK_PREFERENCE。由于仅允许阅读安全设置,因此我看不到任何常规方法可以做到这一点。如果那不是真的,请纠正我。
关于阅读此设置,请注意,我没有尝试过,但报告了一些与此相关的错误。