我目前正在开发一个应用程序,它不时获取用户位置并存储它,稍后通过网络发送它。我一直在测试位置轮询器,但有一些问题,似乎在一些Android模型中的位置更新一段时间没有收到。该服务确实运行,但只返回最后一个已知位置。下面我收到的一些数据显示我的意思:
+----------+------------------+--------------------+--------------+--------------+
| Accuracy | Date registered | Date from position | Lat | Lng |
+----------+------------------+--------------------+--------------+--------------+
| 8.3 | 16/08/2013 14:23 | 16/08/2013 14:23 | -2.361.446 | -4.665.134 |
| 45 | 16/08/2013 14:28 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 14:32 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 14:36 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 14:40 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 14:44 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 14:48 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 14:52 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 14:56 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 15:00 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 15:04 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 15:08 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 15:12 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 15:16 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 15:20 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
| 45 | 16/08/2013 15:24 | 16/08/2013 02:26 | -235.644.403 | -465.143.039 |
+----------+------------------+--------------------+--------------+--------------+
有什么想法吗?
答案 0 :(得分:0)
我也遇到了使用CWAC轮询器的问题,最后使用来自this popular SO post的材料和我自己的定时器/广播接收器来控制频率。 MyLocation代码和this教程最终对我有用。祝你好运!