Real time sharing of GPS location(GPS位置实时共享)
问题描述
我是安卓世界的新手.我想知道如何获得朋友的位置并将其显示在地图上.更确切地说,我不知道如何分享我和我朋友的位置.也许必须使用服务器或类似的东西?
I'm pretty new in the android world. I am wondering how can I get the position of my friends and display it on a map. More precisely, I don't know how to share the position of my friends and I. Maybe have to use a server or something like that ?
编码难吗?
谢谢,
阿诺
推荐答案
你可以看看现有的开源解决方案.
You can look at existing open source solutions.
这是一个服务器端源代码:https://github.com/tananaev/traccar/
Here is a server side source code: https://github.com/tananaev/traccar/
这里是安卓应用:https://github.com/tananaev/traccar-client-android
通信是通过 TCP 连接完成的.
Communication is done over TCP connection.
- 建立连接后客户端发送识别信息:
$PGID,123456789012345*0F 其中 123456789012345 是唯一的设备标识符,在本例中为 IMEI
$PGID,123456789012345*0F where 123456789012345 is a unique device identifier, in this case IMEI
- 然后客户端以标准 NMEA RMC 格式发送具有选定间隔的位置报告:
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
这篇关于GPS位置实时共享的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:GPS位置实时共享


- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01