在 Android 上验证设备电话号码
我正在编写一个应用程序,它将使用人员的电话号码(在设备上)来识别我的网络上的用户。我可以使用什么方法来验证从设备检索到的电话号码是真实的而不是欺骗的。我想出了两种方法来做到这一点,但它们都需要使用短信:
- 从设备发送短信到我的服务器
- 从我的服务器发送短信到设备并用我的应用程序拦截它
还有其他方法吗,我想如果可能的话,省略使用短信。
谢谢
i am writing an app that will use persons phone number (on a device) to identify the user on my network. what methods can i use to verify that the phone number retrieved from the device is real and not spoofed. i came up with two methods to do it but both of them require use of SMS:
- sending SMS from a device to my server
- sending SMS from my server to a device and intercepting it with my app
are there any other methods, i would like to omit using SMS if possible.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想我找到了最好的方法。基本上,我会让我的应用程序向自身发送一条特殊的短信,即设备的电话号码。我当然会通知用户这将发生。然后我的应用程序将拦截短信并知道该号码一切正常。这应该可以做到...
i think i found the best way to go about it. basically, i will have my app send a special text message to itself, the phone number of the device. i will of course notify the user that this will occur. my application will then intercept the SMS and will know that the number is all good. this should do it...
但这些功能取决于 sim 提供商供应商...所以,这不是有效的方法...也识别...特定的移动设备...使用 IMEI 号。适用于所有 Android 设备..如果它看起来很重要,你可以使用它...
but these functionality is dependent to sim provider vendor... so, it's not the efficient way.. too identify... the particular mobile.. use of IMEI no. is applicable to all android devices.. if it seems significant u can use it...
好的,新答案哈哈,
您的问题与加密传输或网站注册问题完全相同。
您可以阅读有关加密程序如何相互传输公钥和私钥的信息,我不记得详细信息,但如果您的应用程序和服务器都有密钥,您可以使用它来加密电话号码+ConstantString 和电话等内容数字,然后解密并查看数字是否匹配。
杰森
ok new answer lol
your problem is then exactly the same as encrypted transfers or website register issues.
you could read up on how encryption programs transfert public and private keys to each other, I can't remember the details but if your app and your server both have a key you can use it to encrypt something like phone number+ConstantString and the phone number and then decrypt it and see if the numbers match.
jason