1. @interface里: CLLocationManager *locationManager;2. 初始化: locationManager = [[CLLocationManager alloc] init];3. 调用请求: [locationManager reque...
分类:
移动开发 时间:
2014-09-23 10:45:54
阅读次数:
220
1 public class Main extends Activity implements OnClickListener { 2 private LocationManager locationManager; 3 private Location location; ...
分类:
其他好文 时间:
2014-09-21 19:05:41
阅读次数:
275
因项目中要用到GPS定位,学习了下,便把学习成果记录下来。
在清单文件中添加权限:
用到的几个对象,LocationManager、LocationListener、Location.
*LocationManager 位置管理器,想要操作定位相关设备,必须先创建一个一个LocationManager对象。
...
分类:
移动开发 时间:
2014-09-11 11:13:31
阅读次数:
236
Pro Android学习笔记:Pro Android学习笔记(一一七):Location(3):获取位置更新 2014.8.25Pro Android学习笔记(一一六):Location(2):LocationManager的位置获取 2014.8.21Pro Android学习笔记(一一五):L...
分类:
移动开发 时间:
2014-08-25 22:28:55
阅读次数:
484
Android提供了GPS功能LocationManager obj = (LocationManager)getSystemService(Context.LOCATION_SERVICE)Permission基本上是使用百度地图定位
分类:
移动开发 时间:
2014-08-06 14:41:11
阅读次数:
211
1,要想使用Google Map进行开发,则创建项目时一定要选择支持Google APIs的SDK。
2,使用LocationManager可以实现对用户所处位置的坐标监听。
3,要想在手机上显示Google Map,则需要向Google申请服务。
4,在一个地图上可以设置多个地图层(Overlay),用户可以通过ItemizedOverlay类手工标记,也可以使用M...
分类:
其他好文 时间:
2014-08-03 15:20:35
阅读次数:
285
如果写插入location:
final class LocationHelper {
private LocationListener mLocationListener;
private WriteBlog activity;
private LocationManager mLocationManager;
// 默认延迟。单位:秒
private int timeo...
分类:
其他好文 时间:
2014-08-03 10:16:45
阅读次数:
265
一、iOS自带定位
1、SignInSignOutViewController.h
@interface SignInSignOutViewController : UIViewController{
CLLocationManager *_locationManager;
// 纬度
float _latitude;
// 经度
float _long...
分类:
移动开发 时间:
2014-07-28 16:14:46
阅读次数:
254
实现效果:
1.发送指令#*location*#,可以远程获取到手机的地理位置(经纬度),并以短信的形式返回。
2.发送指令#*locknow*#,可以远程锁屏并设置锁屏密码。
实现原理:
1.注册广播接受者,监听手机收到的短信,并对符合要求的特定短信进行拦截和处理。
2.通过LocationManager获取地理位置。
3.使用DevicePoli...
分类:
移动开发 时间:
2014-07-20 23:09:34
阅读次数:
382
GPS核心API Android SDK为GPS提供了很多API,其中LocationManager类是这些API的核心。LocationManager是一个系统服务类,与TelephonyManager、AudioManager等服务类的作用和创建服务类对象的方法类似。所有与GPS相关的操作都由....
分类:
其他好文 时间:
2014-07-20 22:27:03
阅读次数:
249