扫码关注官方订阅号
安卓新人,尝试写一个天气预报软件,需要用到定位
在提问之前已经百度好久了,也找到不少方法。谷歌的貌似不能用了,百度apistore,apix等也没找到合适的,要么收费要么不会用,像这个:sid,nid参数不知怎么获取。
特此来求基站定位方法
光阴似箭催人老,日月如移越少年。
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);CdmaCellLocation location = (CdmaCellLocation) tm.getCellLocation();int sid = location.getSystemId();int bid = location.getBaseStationId();int nid = location.getNetworkId();
www.cellocation.com 有免费的基站定位接口
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
CdmaCellLocation location = (CdmaCellLocation) tm.getCellLocation();
int sid = location.getSystemId();
int bid = location.getBaseStationId();
int nid = location.getNetworkId();
www.cellocation.com 有免费的基站定位接口