当前位置: 代码迷 >> Android >> Location服务 的 有关问题
  详细解决方案

Location服务 的 有关问题

热度:233   发布时间:2016-05-01 22:28:47.0
Location服务 的 问题 请教各位
应用程序 是不是 一开始 不能直接就 
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); 


因为 没有 
ServiceManager.addService(Context.LOCATION_SERVICE, new LocationManagerService(context));


new LocationManagerService(context)的时候 ,会 初始化 gps线程 ,并打开设备。

这样的话: addservice 这个动作 是谁来做???应用程序本身么 ,好像网上的例子 都没有这一步。
   



------解决方案--------------------
明显是Framework帮你做了..
  相关解决方案