Difficulty in sending location of user 1 to user 2 and user 2's location to user 1?

徘徊边缘 提交于 2019-12-01 14:44:12

Well one problem you have is at line 102:

String msg = Double.toString(latitude) + " " +Double.toString(longitude) ;

You haven't updated latitude and longitude to reflect your current position. Add this code right before that line:

latitude = location.getLatitude();
longitude = location.getLongitude();

See what happens once that is fixed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!