现在的位置: 首页 > 综合 > 正文

判断Gps开关

2013年05月12日 ⁄ 综合 ⁄ 共 312字 ⁄ 字号 评论关闭

if (locationManager != null && activity!=null) {
            boolean isGPSenable = locationManager
                    .isProviderEnabled(LocationManager.GPS_PROVIDER);
            boolean isAGPSenable = locationManager
                    .isProviderEnabled(LocationManager.NETWORK_PROVIDER);

            if (!isGPSenable && !isAGPSenable) {
            }

抱歉!评论已关闭.