Android GMS无法通过网络定位
来源:互联网 发布:ae cc 2016 mac破解 编辑:程序博客网 时间:2024/05/16 16:57
前言
欢迎大家我分享和推荐好用的代码段~~
声明
欢迎转载,但请保留文章原始出处:
CSDN:http://www.csdn.net
雨季o莫忧离:http://blog.csdn.net/luckkof
正文
framework/base/core/res/res/values/config.xml
<string-array name="config_locationProviderPackageNames" translatable="false">
<!-- The standard AOSP fused location provider -->
<item>com.android.location.fused</item>
<!-- MTK add for GMS -->
<item>com.google.android.location</item>
<item>com.google.android.gms</item>
<!-- MTK add end -->
</string-array>
请在alps\external\wpa_supplicant_8\wpa_supplicant\bss.c中的如下函数中修改
static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src,
struct os_time *fetch_time)
{
struct timespec ts;//add this line;
dst->flags = src->flags;
os_memcpy(dst->bssid, src->bssid, ETH_ALEN);
dst->freq = src->freq;
dst->beacon_int = src->beacon_int;
dst->caps = src->caps;
dst->qual = src->qual;
dst->noise = src->noise;
dst->level = src->level;
/* dst->tsf = src->tsf;*/ //delete this line
//add below code
if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0)
dst->tsf = src->tsf;
else
dst->tsf = ts.tv_sec*1000000 + ts.tv_nsec/1000;
//end
calculate_update_time(fetch_time, src->age, &dst->last_update);
}
如果是编译模块进行验证,请先执行./mk &project_name mm external/wpa_supplicant_8/wpa_supplicant
将alps/out/target/product/project_name/system/bin/wpa_supplicant push到system/bin/下,再执行命令
adb shell chmod 755 system/bin/wpa_supplicant
重启系统后验证
谢谢!
- Android GMS无法通过网络定位
- Android GMS 无法通过网络定位
- KK GMS无法通过网络定位
- 部分国行Android手机缺少谷歌GMS服务包导致HTML5 Geolocation无法定位的问题
- android之GMS认证
- android 6.0 gms
- android GMS 耗电分析
- Android手机GPS卫星定位与通过WLAN与移动网络定位的区别?
- Android网络定位实现
- Android-GPS,网络定位
- 解决Android下Google Maps无法通过GSM基站定位问题
- android 4.2安装GMS包
- android 4.2安装GMS包
- android GMS认证之testNoDebuggable
- android GMS认证之testScreenCaptureDisabled_allowedPrimaryUser
- android GMS认证之testGoogleDuoPreloaded
- SQL2005无法通过网络连接
- Android 通过GPS进行定位
- linux 下vi命令大全总结
- 日期时间类
- javascript深入理解js闭包
- CSS content内容生成技术以及应用
- java虚拟机内存
- Android GMS无法通过网络定位
- eclipse导出war包文件缺失问题
- CSS hover实现多种块效果1
- UML类图图示
- NAT(NAPT)地址转换过程
- This text field does not specify an inputType or a hint
- Adapter的getViewTypeCount和getItemViewType[转]
- 第十二周项目3-摩托车继承自行车和机动车
- java中的使用RSA算法进行公钥加密私钥解密