- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
如果数据连接不可用(因此 Geocoder
不起作用),我想找出用户当前所在的国家/地区。我想我可以通过使用 TelephonyManager.getNetworkCountryIso
在手机(不是平板电脑)上执行此操作,但我发现文档对我来说不够清楚。 documentation说:
Returns the ISO country code equivalent of the current registered operator's MCC (Mobile Country Code).
Availability: Only when user is registered to a network. Result may be unreliable on CDMA networks (use getPhoneType() to determine if on a CDMA network).
这里的current registered operator具体是什么意思?这是否仅仅意味着用户当前连接到的网络,无论他们身在何处,而与他们的 SIM 注册位置(“家庭”网络)无关?
结果在什么意义上在 CDMA 网络上不可靠?这是否意味着它可能返回 null
,或者给出非 null
但具有误导性或不准确的结果?
最佳答案
我相信 MCC 取决于您在世界上的位置。世界上很多地方都不使用 CDMA,导致您的手机在某些情况下无法连接。我相信在这些情况下它只会返回不准确的结果。
关于android - TelephonyManager.getNetworkCountryIso() 究竟返回什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26789128/
Feel free to skip straight to TL/DR if you're not interested in details of the question 简短的序言: 我最近决定
我一直在阅读 A Tour of Go学习Go-Lang到目前为止一切顺利。 我目前在 Struct Fields类(class),这是右侧的示例代码: package main import "fm
Last time I got confused顺便说一下PowerShell急切地展开集合,基思总结了它的启发式如下: Putting the results (an array) within a
我是一名优秀的程序员,十分优秀!