美文网首页Location
关于android的模拟定位问题

关于android的模拟定位问题

作者: 笨coco | 来源:发表于2018-04-18 15:56 被阅读35次

断是否开启了系统模拟位置

public static boolean isSelectedMoniLocal(Context mContext){

boolean status=false;

if(Build.VERSION.SDK_INT > 22){

//6.0以上版本

if(isSelectedCurApp(mContext)){

ToastUtil.showMessage(mContext, "为保证位置精确性,请不要允许此应用使用模拟定位",

Toast.LENGTH_SHORT);

status=true;

}

}else{

if (getMockLocationStatus(mContext).equals("1")) {

ToastUtil.showMessage(mContext, "为保证位置精确性,请关闭【允许模拟位置】选项!",

Toast.LENGTH_SHORT);

status=true;

}

}

return status;

}

相关文章

网友评论

    本文标题:关于android的模拟定位问题

    本文链接:https://www.haomeiwen.com/subject/rucsxxtx.html