从下面Android代码可以得到一些有限的提示:
http://www.netmite.com/android/mydroid/frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java
Service to communicate to the Google Location Server (GLS) via MASF server
// Methods exposed by the MASF server
private static final String REQUEST_QUERY_LOC = "g:loc/ql";
private static final String REQUEST_UPLOAD_LOC = "g:loc/ul";
可以认为,MASF是一个中继服务器,客户端和MASF服务器交互,然后MASF服务器再和Google真正的服务器交互。
客户端和MASF服务器交互通过HTTP协议,数据格式是protocol buffer,已经有jar包:
https://github.com/android/platform_external_googleclient/blob/master/googleclient-lib.jar
在请求的数据中,可以指定请求的服务的URL,版本号等信息。
一些定义:
public static final short PROTOCOL_VERSION_0_0 = 0;
public static final short PROTOCOL_VERSION_0_1 = 1;
public static final short SERVICE_VERSION_0 = 0;
public static final short SERVICE_VERSION_1 = 1;
public static final short SERVICE_VERSION_2 = 2;
public static final int BLOCK_TYPE_REQUEST_HEADER = 1;
public static final int BLOCK_TYPE_REQUEST_PLAIN = 256;
public static final int BLOCK_TYPE_REQUEST_MULTIPART = 257;
public static final int BLOCK_TYPE_RESPONSE_NON_MULTIPART = 33024;
public static final String ENCODING_GZIP = "g";
public static final String ENCODING_NOP = "n";
public static final String ENCODING_NONE = "";
分享到:
相关推荐
test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3
[YOLOv7]基于YOLO&Deepsort的人流量统计系统(源码&部署教程)
Recognizecaptchabymachinelearning.机器学习识别图片验证码(专门应付本科毕业设计)_hy5
Python基于CycleGAN&pix2pix的黑白图像AI上色(源码&部署教程)
收录了「IT无知君」CSDN博客中涉及的【Java项目源码】,还有许多的开发工具类,都是我自己在用在不断维护的,需要请进!_hy5
coderwhycms后台接口使用nestjs+mysql+typeorm-prisam+docker+jwt+re_hy4
Java轻量化RBAC权限控制系统_hy4
3个小项目分别是利用Python实现报表自动化、某连锁超市、某银行数据分析,展示了问题分解、数据清洗、数据分析与可视化的过程。_hy4
前端分析-2023071100789
330 Series Campus Access Points IAP-334 IAP-335
【Swift】swift项目仿写喜马拉雅App,采用MVC+MVVM设计模式
ebay的python爬虫_hy4
【Java】一套自定义的RBAC权限管理框架,基于SpringMVC,mybatis_pgj
【go】基于微服务框架go-micro封装的go微服务脚手架_pgj
分布式事务-seata_hy5
【Java】jta分布式事务+多数据源_pgj
python写的12306爬虫,用的tkinter做可视化界面_hy5
音乐推荐系统,python编写,涉及flask框架,scrapy爬虫,MySQL数据库,selenium,chrome_hy4
Python网络爬虫从入门到放弃_hy4
318 Series Hardened Access Points 370 Series Outdoor Access Points 387 Series Outdoor Access Points 320 Series Campus Access Points 310 Series Campus Access Points IAP-315 IAP-325 IAP-324 IAP-314