检测到用户已经进入了一个物理位置与她的Andr​​oid / iOS设备 [英] Detecting that a user has entered a physical location with her Android / iOS device

查看:101
本文介绍了检测到用户已经进入了一个物理位置与她的Andr​​oid / iOS设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果用户安装了她的手机在一个特定的应用程序,但应用程序并不运行在前台,什么是检测,她已经进入了一个物理位置与Android / iOS设备的最佳方式?假设应用程序有所有必需的权限和Android中的情​​况下,正在运行的每一分钟后台服务。

If a user has a particular app installed on her phone but the app is not running in the foreground, what is the best way to detect that she has entered a physical location with the Android / iOS device? Assume that the app has all the required permissions and in the case of Android, there is a background service running every minute.

我能想到的轮询的GPS,但缺点是用户可能已经关闭了GPS。

I can think of polling the GPS but the drawback is that the user might have switched off her GPS.

这同样有可能的蓝牙唤醒发生,如果蓝牙处于关闭状态。同上,用于无线网络。

The same would happen with a possible bluetooth wake-up if bluetooth is off. Ditto for WiFi.

能否像从硬件发出的声音超音速放置在工作地点的入口? (类似<一个href=\"http://techcrunch.com/2011/10/05/coming-soon-to-a-store-near-you-tagtile-a-square-like-mobile-loyalty-service/\"相对=nofollow> Tagtile也许的?)

Could something like supersonic sound emitted from a hardware placed at the entrance of the location work? (Something like Tagtile perhaps?)

以下哪4你最依赖的?为Android?适用于iOS?或者你更愿意使用一些其他的方法?

Which of these 4 would you most rely on? for Android? for iOS? Or would you rather use some other method?

推荐答案

有可能跟踪用户的行踪。虽然我不会去解释整个过程是如何完成的(因为这将是我自己写的主题教程的等价物),它走遍了详细苹果文档,<一个href=\"https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009497\"相对=nofollow>这里覆盖(相信是你正在寻找的<一个href=\"https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocation_Class/CLLocation/CLLocation.html#//apple_ref/doc/uid/TP40007126\"相对=nofollow> CLLocation )。

It is possible to track a users whereabouts. While I will not go on to explain how the entire process is done (as it would be the equivalent of writing my own tutorial on the subject), it is gone over in detail in the Apple Docs, covered here(I believe what you are looking for is the CLLocation).

这甚至可以在后台运行,因为也包括在苹果的文档在许多地方,<一个href=\"https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW20\"相对=nofollow>其中之一是这里。

This can even run in the background, as also covered in the Apple Docs in many place, one of them being here.

有关iOS应用程序,这也是我推荐。

For an iOS app, that is what I would recommend.

如果用户关闭位置跟踪和/或他们的GPS,我相信你将不得不对付它。跟踪一个人,当他们没有得到许可或明确拒绝了此权限的话,在许多国家是非法的。

If the user turns off Location Tracking and/or their GPS, I believe you are going to have to deal with it. Tracking a person, when they have not given permission or explicitly denied the permission to do so, is illegal in many countries.

修改

逃离我的脑海里一会儿是谷歌定位API 。可能是最了解和使用位置服务的人会得到你跟踪为Android。

Escaping my mind for a moment was the Google Location API. Probably one of the most known and used Location services will get you your tracking for Android.

编辑2

如果一个人已经关闭他们的GPS或无线网络,就不会有办法告诉他们的物理位置。如果你能跟踪一个人,当他们WiFi或GPS被关闭将您的应用程序归类为的间谍软件,而不会是一个好主意。

If a person has turned off their GPS or Wifi, there would not be a way to tell their physical location. If you were able to track a person when their Wifi or GPS was turned off would classify your app as spyware, and would not be a good idea.

这篇关于检测到用户已经进入了一个物理位置与她的Andr​​oid / iOS设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆