![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
定时传定位信息
Happy_ju_an
这个作者很懒,什么都没留下…
展开
-
用原始方式获取经纬度的方法
留个代码,方便以后复制粘贴public class LocationUtil2 { private volatile static LocationUtil2 uniqueInstance; private LocationManager locationManager; private String locationProvider; private Location location; private Context mContext; priv原创 2020-06-16 16:19:36 · 326 阅读 · 0 评论 -
使用service和BroadcastReceiver实现定时像服务端发送当前位置
需求:应用开启后,每隔5分钟,向服务器发送一次自己的位置public class LocationService extends Service { private static boolean control = false; private AlarmManager mManager; private PendingIntent mPi; public LocationService() { } @Nullable @Override原创 2020-06-16 16:14:41 · 364 阅读 · 0 评论