找到一个应用程序附近用户(iPhone和Android)应用程序、附近、用户、Android

2023-09-05 00:34:58 作者:如果这就是爱我﹡

我工作的一个应用程序,有一个iPhone版本以及一个Android版本。

I am working on an app that has an iPhone version as well as an Android version.

我的目标是......

My goal is...

显示我的应用程序(iPhone应用程序的用户和Android应用程序的用户)附近用户的列表。比方说一个列表的用户这是目前为1英里2英里半径范围内,目前正在使用我的应用程序。 在该列表将显示在这两个应用程序,iPhone应用和Android应用程序。 当用户点击刷新按钮应用程序会更新列表。

我的问题是...

什么是实现上述目标的最佳方法是什么?我是否需要定期发送从他们的机器人和iPhone应用程序的所有用户的当前GPS位置,我们的Web服务器?

为了使我的问题更清楚......

To make my question more clear...

在我有一个算法来找出地方/在给定范围内的用户(1英里或2方圆十里等),所以请不要告诉我如何找到一个给定范围内的用户。 我知道如何让iPhone和Droid的设备的当前位置,所以请不要告诉我怎么去更新一个iPhone或Android设备的位置。 我知道,这是一个隐私问题。因此,应用程序会要求用户允许发送自己的位置,以我们的Web服务器,所以请不要告诉我有关隐私问题的用户或苹果可能有。 只是告诉我如何最好地保持我的应用程序的用户在Web服务器上的地缘位置的更新列表?最好的,行之有效的方法! 让我知道如果我的问题仍然需要澄清。 I have an algorithm to find out the places/users within a given range (1 mile or 2 miles radius etc), so PLEASE DON'T TELL ME how to find users within a given range. I know how to get current location of iPhone and Droid devices, so PLEASE DON'T TELL ME how to get updated location of an iPhone or Android device. I know that this is a privacy issue. Therefore app will ask for user's permission to send their location to our web server, so PLEASE DON'T TELL ME about privacy concerns users or Apple may have. JUST TELL ME how to best maintain updated list of Geo Locations of my app users on the web server? The best, proven approach! Let me know if my question still needs clarification.

感谢和问候

推荐答案

即使今天我在我的脑海这个问题,同时创造类似的应用程序。 Alert当两个用户/朋友都接近对方 - 安卓接近

Even i had this question on my mind today while creating similar app. Alert when two users/friends are near to each other - Android Proximity

花了几个小时的思考后,我想到了一个更好的办法来做到这一点:

after spending a couple of hours thinking, I thought a better way to do this :

1)创建共享preference / DB持有这也是更新到服务器设备的最后坐标

1) Create SharedPreference / DB which holds the last Coordinates of the device which was also updated to the server.

2)创建服务,这将触发一次,在15分钟内请求当前的位置。

2) Create Service which will fire once in 15 minutes requesting current location.

3)如果当前位置的共享preference和(或)周围内接近检索到的最后位置相匹配(取决于你多给30英尺或以上​​),那么用户在同一个地方的所以不要吨上传的坐标到服务器。

3) If the current location matches the Last Location retrieved from the SharedPreference and or around within proximity (depends on how much u give 30ft or more) then user is in the same place so don't upload the coordinates to the server.

4)如果用户不是在靠近或最后一个位置不匹配的当前位置,然后坐标上传到服务器。

4) If the user isn't within proximity or last location doesn't match current location then upload the coordinates to the server.

5)上传坐标到服务器后,更新共享preference太..

5) After uploading coordinates to the server, update SharedPreference too..

6)当上载,也得到谁是附近相同的坐标服务器的用户的详细信息。该用户随后将得到通知,如果有人在他们周围。

6) While uploading, also get Users details from the server who are nearby the same coordinates. The User will then get notified if someone around them..