Codenameone:如何获取真实设备中当前SIM卡的手机号码? [英] Codenameone:How to get the mobile number of current sim card in real device?
问题描述
如何在真实设备中获取当前sim卡的手机号码,以及如何从mobile读取消息。
我只想读取SIM卡号和手机信息。
您能否让我知道如何解决它。
How to get the mobile number of current sim card in real device and how to read meassage from mobile . I just want to read sim card number and messages of mobile. Can you please let me know how to resolve it.
推荐答案
移动设备不提供该信息以确保安全/隐私原因。您可以在一些低级的Android API中访问它,但是由于它不是可移植的,因此我们不会公开它。
Mobile devices don't provide that information for security/privacy reasons. You can access it in some low level Android API's but since this isn't portable we don't expose that.
请注意,诸如whatsapp,uber,gettaxi等应用程序。所有人都要求您输入电话号码,然后输入通过短信发送的验证码。这正是 JAT (由代号One生成)的作用。
Notice that apps like whatsapp, uber, gettaxi etc. all ask you to type in your phone number then a verification code sent via an SMS. That's exactly what JAT (which was built with Codename One) does.
这篇关于Codenameone:如何获取真实设备中当前SIM卡的手机号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!