本文介绍了跟踪用户在后台GPS位置,并通知他旁边的某一点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个理论问题。我想,为了在给定时间(上午11:45)和仅仅如果他旁边是一个特定的位置(与纬度/经度,通知他来跟踪我的应用程序(iOS和Android)用户)的即使在应用程序不公开

I have a theoretical question. I want to track a user with my app (iOS and Android) in order to notify him at a given time (11:45am) and just if he is next to a specific location (with lat/lng) even when the app is not open.

它是更好地检查用户的位置,每隔5分钟,当设备跟踪500公尺的变化,向服务器发出请求(如果时间是正确的,如果位置是正确的),然后发送一个推通知(当地点和时间是正确的)?或者我应该为了唤醒应用程序,并检查用户的当前位置发出一个透明的推送通知(没有视觉通知)?这是一个常见的​​做法?

Is it better to check the users location every 5 minutes when the device tracks a 500m change, and make a request to the server (if the time is right, and if the location is right), and then send out a push notification (when location and time is right)? Or should I send out a transparent push notification (without a visual notification) in order to wake up the app and to check the current location of the user? Is this a common practice?

修改我觉得问题不是明确的,因为我认为这将是的,所以我想更precise:我想,如果通知我的用户(iOS和Android),他们在是在特定的时间特定的位置(与纬度/经度指定)。(如:上午11:00),甚至当应用程序被关闭。

EDIT I think the question is not as clear as I thought it will be, so I want to be more precise: I want to notify my user (iOS and Android) if they are at a specific location (specified with lat/lng) at a given time (e.g.: 11:00am), even when the app is closed.

我怎么能这样做?

推荐答案

您500米要求是插图中的GPS和手机信号塔。

Your 500m requirement is inbetween GPS and cell tower.

手机信号塔locationing提供有关在城市千米acuracy和高达农村地区3公里,这个位置技术在地理围栏和IOS自动唤醒使用(你的时候,应用程序是不开)被使用。这并不需要太多的电池。

cell tower locationing has about 1000m acuracy in cities and up to 3km in rural regions, this location technique is used in geofencing and the ios auto-wakeup (your "when the app is not open") is used. This does not need much battery.

GPS拥有约3-20m,准确性和耗电量。是否需要在检查每一秒,或者让API调用你的每百米的电池消耗并没有改变。一些最高acuracy模式IOS(模式best_for导航),addionally使加速度传感器,whigh可能需要更多的电源,然后。 (该模式下,你不需要)

GPS has about 3-20m, accuracy and uses more battery. battery consumption does not change wheter you check every second, or let the APi call you every 100m. Some highest acuracy mode ios (mode best_for navigation), addionally enable acceleration sensor, whigh might need a bit more power then. (This mode, you dont need)

(在城市也WLAN定位技术可以提供一个位置probbaly满足您的REQ。)

(In cities also the Wlan location technique may provide a location probbaly meeting your req.)

所以,你必须千米电池电量低或高5米电池消耗之间的选择。
没有任何插图中(除了有时WLAN)。

So you have the choice between 1000m low battery or 5m high battery consumption.There is nothing inbetween (besides sometimes WLAN).

这篇关于跟踪用户在后台GPS位置,并通知他旁边的某一点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 11:55