android 小米定位失败怎么办,使用原生网络定位,部分机型无法获取经纬度该怎么解决?...

现在是小米,华为,vivo可以,锤子坚果pro2不行,下面是代码:

public class FinishedContractActivity extends BaseActivity implements LocationListener {

private BottomSheetDialog mCheckSignDialog;

private BottomSheetDialog mSignProcessDialog;

private CheckSignBean checkSignBean;

private SignProcessBean signProcessBean;

private SealPresenter mPresenter = new SealPresenter(this);

private LocationManager locationManager;

//省略部分无关代码...

@SuppressLint("MissingPermission")

@Override

protected void initView(Bundle savedInstanceState) {

boolean deviceRooted = DeviceUtils.isDeviceRooted();//是否root

if (!deviceRooted) {

locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);

locationManager.requestLocationUpdates("network", 0, 0, this);

你可能感兴趣的:(android,小米定位失败怎么办)