首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Location服务 的 有关问题

2012-02-28 
Location服务 的 问题 请教各位应用程序 是不是 一开始 不能直接就LocationManager locationManager (Lo

Location服务 的 问题 请教各位
应用程序 是不是 一开始 不能直接就 
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); 


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


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

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



[解决办法]
明显是Framework帮你做了..

热点排行