[英]Can we locate a user via user's phone number in Android?
Is it possible to locate a user via user's phone number in Android? 是否可以通过Android中的用户电话号码找到用户? If an SMS can be sent to the user then we can also retrieve or get to know the location of the user who we sending the SMS.
如果可以将SMS发送给用户,那么我们还可以检索或了解我们发送SMS的用户的位置。
I mean is it possible to program the following functionality: 我的意思是可以编程以下功能:
Also is it possible to retrieve the required location of the user via user's phone number via any other means apart from SMS, EMAIL or CALL? 还可以通过除SMS,EMAIL或CALL之外的任何其他方式通过用户的电话号码检索用户所需的位置吗?
How come Viber and VChat apps are locating user locations via their phone numbers? Viber和VChat应用程序如何通过电话号码查找用户位置?
Here are some apps on the app store: 以下是应用商店中的一些应用:
Seeking for a reliable answer. 寻求可靠的答案。
Yess, possible with conditions: 可能有条件的Yess:
If you have your app installed in the user phone and a server app communicating with this app, and there at last one of location service providers activated in the user phone, and some horrible android permissions! 如果您的应用程序中安装了您的应用程序,并且服务器应用程序与此应用程序通信,并且最后一个位置服务提供商在用户手机中激活,并且有一些可怕的Android权限!
In most of android phones there 3 location providers that can give exact location (GPS_PROVIDER 1m) or estimated ( NETWORK_PROVIDER around 2-20m) and PASSIVE_PROVIDER (more in LocationManager official documentation). 在大多数Android手机中,有3个位置提供商可以提供准确的位置(GPS_PROVIDER 1m)或估计( NETWORK_PROVIDER大约2-20m)和PASSIVE_PROVIDER (更多在LocationManager官方文档中)。
1* App sends SMS to user's phone
1 * App向用户的手机发送短信
Yess, can be server app or you create an android app if you want something automated, so you can do it manually by sending SMS from your default SMS app! Yess,可以是服务器应用程序,或者如果你想要自动化的东西你创建一个Android应用程序,所以你可以通过从默认的短信应用程序发送短信手动完成! I use Kannel : Open Source WAP and SMS Gateway and here ( lot of APIs to send SMS )
我使用Kannel :开源WAP和短信网关和这里( 很多API发送短信 )
2* App receives SMS at user's phone from the SMS sender
2 *应用程序从SMS发件人处收到用户电话的短信
Yess, you can get all received SMS, and you can filter them by sender phone number! 是的,你可以收到所有收到的短信,你可以通过发件人的电话号码过滤它们! and do some actions when your specified sms received, basic tuto here (i do some actions according to the content of my SMS)
当你指定短信收到时做一些动作, 基本tuto在这里 (我根据我的短信内容做一些动作)
3* App gets location coordinates of the user's phone
3 * App获取用户手机的位置坐标
Yess, you can get actual user coordinates easily if one of location providers is activated, so you can get last known location when the user have activated one of location providers, if those disabled or the phone don't have GPS hardware you can use Open Cell Id api to get the nearest cell coordinates(10m-10Km) or Loc8 api but those not available in all around the world, and some apps use IP location apis to get the country, city and province, here the simplest way to get current user location . Yess,如果其中一个位置提供程序被激活,您可以轻松获得实际的用户坐标,这样当用户激活其中一个位置提供程序时,您可以获取最后的已知位置,如果这些已禁用或手机没有GPS硬件,您可以使用Open Cell Id api获取最近的单元格坐标(10m-10Km)或Loc8 api但是全世界都没有,有些应用程序使用IP位置apis来获取国家,城市和省,这里是获取当前最简单的方法用户位置 。
4* App sends location coordinates to the SMS sender via SMS
4 * App通过短信向SMS发件人发送位置坐标
Yess, you can get sender phone number and send user location, immediately when SMS received or at specified times in the day. 是的,您可以在收到短信时或在当天的指定时间立即获取发件人电话号码并发送用户位置。
(Those 4 yesses for you :) ) (这4个是你的:))
Viber and other apps that access to users locations, identify there users by there phone numbers by obligating them to send SMS to the server app to create an account and activate the free service (Ex:VOIP) , and lunch a service that can: Viber和其他访问用户位置的应用程序,通过电话号码识别用户,强制他们向服务器应用程序发送短信以创建帐户并激活免费服务(例如:VOIP),午餐服务可以:
And your application users must accept all of that when installing it, of corse i don't gonna install apps like this because i read permissions before installing :) and permissions maybe something like that: 并且您的应用程序用户必须在安装它时接受所有这些,我不会安装这样的应用程序,因为我在安装之前读取权限:)和权限可能是这样的:
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<-- and more if you wanna more -->
The final user will accept for something like that (those permissions of an android app u asked about): 最终用户将接受类似的东西(你询问的Android应用程序的权限):
This app has access to these permissions: 此应用有权访问这些权限:
Your accounts -create accounts and set passwords -find accounts on the device -add or remove accounts -use accounts on the device -read Google service configuration 您的帐户 - 创建帐户并设置密码 - 在设备上查找帐户-add或删除帐户-use设备上的帐户-read Google服务配置
Your location -approximate location (network-based) -precise location (GPS and network-based) 您的位置 - 近似位置(基于网络) - 精确位置(GPS和基于网络)
Your messages -receive text messages (SMS) -send SMS messages -edit your text messages (SMS or MMS) -read your text messages (SMS or MMS) 您的短信 - 接收短信(短信) - 发送短信 - 编辑短信(短信或彩信) - 阅读短信(短信或彩信)
Network communication -receive data from Internet -full network access -view Wi-Fi connections -view network connections -change network connectivity 网络通信 - 来自互联网的接收数据 - 完整的网络接入 - 查看Wi-Fi连接 - 查看网络连接 - 更改网络连接
Phone calls -read phone status and identity -directly call phone numbers 电话 -读取电话状态和身份 - 直接拨打电话号码
Storage -modify or delete the contents of your USB storage 存储 - 修改或删除USB存储器的内容
Your applications information -retrieve running apps -close other apps -run at startup 您的应用程序信息 -检索正在运行的应用程序 - 关闭其他应用程序 - 在启动时运行
Bluetooth -pair with Bluetooth devices -access Bluetooth settings 蓝牙 -与蓝牙设备配对 - 访问蓝牙设置
Camera -take pictures and videos 相机 - 拍摄照片和视频
Other Application UI -draw over other apps 其他应用程序UI -draw over other apps
Microphone -record audio 麦克风 -记录音频
Lock screen -disable your screen lock 锁定屏幕 -禁用您的屏幕锁定
Your social information -read your contacts -modify your contacts -read call log -write call log -read your social stream -write to your social stream 您的社交信息 - 阅读您的联系人 - 修改您的联系人 - 阅读通话记录 - 写入通话记录 - 阅读您的社交流 - 写入您的社交流
Development tools -read sensitive log data 开发工具 -读取敏感日志数据
System tools -modify system settings -send sticky broadcast -test access to protected storage 系统工具 - 修改系统设置 - 发送粘性广播 - 测试对受保护存储的访问
Affects battery -control vibration -prevent device from sleeping 影响电池控制振动 - 防止设备进入睡眠状态
Audio settings -change your audio settings 音频设置 -更改音频设置
Sync Settings -read sync settings -toggle sync on and off -read sync statistics 同步设置 -read sync settings -toggle sync on和off -read sync statistics
Wallpaper -set wallpaper 壁纸 - 套壁纸
I checked play.google.com/store/apps/details?id=and.p2l&hl=en They are not locating the user's current location at all. 我查看了play.google.com/store/apps/details?id=and.p2l&hl=en他们根本没有找到用户的当前位置。 So based on the number itself they are judging the location of the user.
因此,基于数字本身,他们正在判断用户的位置。 Like if the number starts from 240 ( in US) they they are saying location is Maryland but the person can be in California.
就像这个号码从240(美国)开始一样,他们说位置是马里兰州,但这个人可能在加利福尼亚州。 So i don't think they are getting the user's location through LocationListner of Java at all.
所以我认为他们根本没有通过Java的LocationListner来获取用户的位置。
Quick answer: No, at least not with native SMS service. 快速回答:不,至少不是原生短信服务。
Long answer: Sure, but the receiver's phone should have the correct setup first. 答案很长:当然,接收器的手机应该先设置正确的设置。 An app that detects incoming sms, and if a keyword matches, reports its current location to your server, which then pushes that info to the sender.
检测传入短信的应用程序,如果关键字匹配,则将其当前位置报告给服务器,然后服务器将该信息推送给发件人。
The answer is: you can't only through sms, i have tried that approach before. 答案是:你不仅可以通过短信,我之前尝试过这种方法。
You could fetch the base station IDs, but this won't help you a lot without the location of the base station itself and this informations are really hard to retrieve from the providers. 您可以获取基站ID,但如果没有基站本身的位置,这对您没有多大帮助,这些信息很难从提供商处检索到。
I have looked through the 3 apps you have listed in your question: 我查看了您在问题中列出的3个应用:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.