最新回答 / 自由的气息
试下这个TelephonyManager tel = (TelephonyManager) paramContext.getSystemService(Context.TELEPHONY_SERVICE);CellLocation cellLocation = tel.getCellLocation(); int nPhoneType = tel.getPhoneType(); if (nPhoneType == 1 && cellLocation inst.
2017-01-23
个人免费提供本节源码:http://pan.baidu.com/s/1nvnraSp,注意:使用百度导航功能自己申请密钥,我用的是我申请的,你要用我的放在你自己eclipse上运行估计会错。还要代码中图片是我截图视频的,定位的时候 因为像素(图片大小的问题)问题图标会和你指定位置有偏差
2017-01-06
导航初始化成功,但是点击模拟导航就崩溃原因可能是mLastLocation为空。我是在更新经纬度下面缺了段代码,在视频里有。// 更新经纬度
mLatitude = location.getLatitude();
mLongtitude = location.getLongitude();
LatLng ll = new LatLng(mLatitude, mLongtitude);
mLastLocationData = ll;
if (isFirstIn){......}
mLatitude = location.getLatitude();
mLongtitude = location.getLongitude();
LatLng ll = new LatLng(mLatitude, mLongtitude);
mLastLocationData = ll;
if (isFirstIn){......}