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.
如何知道漫游数据是否启用/禁用?在代码中,我需要知道是否启用了数据漫游。我可以通过 TelephonyManager 检查电话是否正在漫游。但是如何知道是否启用了数据漫游?
NetworkInfo info = (NetworkInfo) ((ConnectivityManager) ctx .getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo(); if(info.isRoaming) { S.O.P("data roaming"); }