关于DelphiXE5如何获取Android手机SIM卡串号

手机号不是存在SIM卡上的,SIM卡只有一个串号.
在运营商的服务器上有手机号和序号对应的一张表.所以你SIM卡办理遗失,运营商只要把新SIM卡的串号和你原来的手机号绑定即可.

获取手机号的唯一办法是收个短信,短信里面有你的手机号码.所以很多程序为了获取手机号会要求你注册时发短信,然后它给你回个短信.

uses
  Androidapi.JNI.GraphicsContentViewText, Androidapi.JNIBridge,
  Androidapi.JNI.Telephony, Androidapi.JNI.JavaTypes, FMX.Helpers.Android;

var
  TelephonyManager: JTelephonyManager;
  TelephonyServiceNative: JObject;
begin
  TelephonyServiceNative := SharedActivityContext.getSystemService
    (TJContext.JavaClass.TELEPHONY_SERVICE);
  if Assigned(TelephonyServiceNative) then
    TelephonyManager := TJTelephonyManager.Wrap
      ((TelephonyServiceNative as ILocalObject).GetObjectID);
  //TelephonyManager.getDeviceId 取IMEI
  //TelephonyManager.getLine1Number 取MSISDN  手机号,大部分SIM卡中不会写入这个信息 
  //TelephonyManager.getSimSerialNumber 取ICCID
  //TelephonyManager.getSubscriberId 取IMSI  运营商实际上是用这个查询的他那张对应电话号码的表
  //还有很多方法,具体请查看JTelephonyManager的声明
end;

此条目发表在Delphi, 未分类分类目录。将固定链接加入收藏夹。

关于DelphiXE5如何获取Android手机SIM卡串号》有163条回应

  1. ji说:

    您好!怎么给 tJavaObjectArray 这个数组添加元素?多谢!

    unit HeaderFooterTemplate;

    interface

    uses
    System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
    FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls
    ,Androidapi.JNI.Provider,
    Androidapi.JNIBridge,
    Androidapi.JNI.JavaTypes,
    Androidapi.JNI.Webkit,
    Androidapi.JNI.Net,
    Androidapi.JNI.Util,
    Androidapi.JNI.GraphicsContentViewText ;

    type
    THeaderFooterForm = class(TForm)
    Header: TToolBar;
    Footer: TToolBar;
    HeaderLabel: TLabel;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
    end;

    var
    HeaderFooterForm: THeaderFooterForm;

    implementation

    {$R *.fmx}

    procedure THeaderFooterForm.Button1Click(Sender: TObject);
    var ph:JContentResolver;
    c:JContacts;
    uri:Jnet_Uri ;
    s :Jnet_UriClass;
    sb:JCommonDataKinds_PhoneClass;
    dp:JContacts_PeopleColumnsClass;
    my,my1:tJavaObjectArray;
    cu:JCursor;
    a,b:JString;
    begin
    //my:=
    // uri:=s.parse(‘content://icc/adn’) ;
    //my.Create(1);
    //my:= dp.DISPLAY_NAME.toString;
    //.
    // my.SetRawItem(0,StringToJString(‘dp.DISPLAY_NAME’));
    //my[0]:=dp.DISPLAY_NAME;
    //my.
    //TJNIResolver.SetObjectArrayElement(my,0,dp.DISPLAY_NAME);
    //a:=StringToJString(”) ;
    // b:=StringToJString(”);
    //my.s
    // my.
    //ph.q
    ShowMessage(‘ok’);
    cu:=ph.query(sb.CONTENT_URI,my,a,my1,b);

    end;

    end.

  2. ji说:

    还有怎么传递JNI里函数里传递NULL值?

  3. 匿名说:

    武兄能否搞个摄像头读取条码的例子

  4. Ruralist说:

    博主你好,我在虚拟机中执行一个 hello world, 2.3.3 版本程序进入即退出,4.1.2 版本则很正常.你知道是什么问题吗

  5. 徐向羽说:

    我试过了,IMEI和ICCID取出来都是空串,为什么?

  6. cjc说:

    测试成功,都可以读。

  7. Pingback引用通告: 43ytr.icu/j/GPoAr

  8. Pingback引用通告: Èãðà ïðåñòîëîâ 8 ñåçîí 2 ñåðèÿ 3 ñåðèÿ

  9. Pingback引用通告: Èãðà ïðåñòîëîâ 8 ñåçîí Ëîñòôèëüì

  10. Pingback引用通告: glyxar.ru

  11. Pingback引用通告: abisko.ru

  12. Pingback引用通告: 2021

  13. Pingback引用通告: Èãðà ïðåñòîëîâ 8 ñåçîí âñå ñåðèè

  14. Pingback引用通告: Èãðà Ïðåñòîëîâ 8 ñåçîí 5 ñåðèÿ

  15. Pingback引用通告: bitly.com/AzAX3

  16. Pingback引用通告: Mstiteli: Final (2019)

  17. Pingback引用通告: ðîêåòìåí ïîëíûé ôèëüì

  18. Pingback引用通告: Video

  19. Pingback引用通告: watch online

  20. Pingback引用通告: 00-tv.com

  21. Pingback引用通告: 4serial.com

  22. Pingback引用通告: we-b-tv.com

  23. Pingback引用通告: kino-m.com

  24. Pingback引用通告: m-dnc.com

  25. Pingback引用通告: ðûáàëêà

  26. Pingback引用通告: 2020

  27. Pingback引用通告: 1 2 3 4 5 6 7 8 9 10

  28. Pingback引用通告: wwin-tv.com

  29. Pingback引用通告: dinotube hd dinotube

  30. Pingback引用通告: Watch TV Shows

  31. Pingback引用通告: Kinokrad 2019 Kinokrad Hd

  32. Pingback引用通告: serial 1

  33. Pingback引用通告: serial

  34. Pingback引用通告: youtube2019.ru

  35. Pingback引用通告: lostfilmtv net

  36. Pingback引用通告: movies

  37. Pingback引用通告: trustedmdstorefy.com

  38. Pingback引用通告: bofilm ñåðèàë

  39. Pingback引用通告: bofilm

  40. Pingback引用通告: Êîíñóëüòàöèÿ ïñèõîëîãà

  41. Pingback引用通告: topedstoreusa.com

  42. Pingback引用通告: hqcialismht.com

  43. Pingback引用通告: viagramdtrustser.com

  44. Pingback引用通告: rick and morty season 3

  45. Pingback引用通告: 1plus1serial.site

  46. Pingback引用通告: #1plus1

  47. Pingback引用通告: Watch Movies Online

  48. Pingback引用通告: Film 2020

  49. Pingback引用通告: parazity-oskar-2020

  50. Pingback引用通告: human design

  51. Pingback引用通告: human design human design

  52. Pingback引用通告: DSmlka

  53. Pingback引用通告: viagra

  54. Pingback引用通告: generic viagra

  55. Pingback引用通告: ¯jak Son³k 2020

  56. Pingback引用通告: generic cialis

  57. Pingback引用通告: cialis online

  58. Pingback引用通告: pobachennya u vegas

  59. Pingback引用通告: Proshanie so Stalinym

  60. Pingback引用通告: t-34

  61. Pingback引用通告: online pharmacy

  62. Pingback引用通告: canadian pharmacy

  63. Pingback引用通告: Beograd film 2020 Beograd

  64. Pingback引用通告: psiholog online

  65. Pingback引用通告: psixolog

  66. Pingback引用通告: psyhelp_on_line

  67. Pingback引用通告: coronavirus

  68. Pingback引用通告: PSYCHOSOCIAL

  69. Pingback引用通告: rasstanovka hellinger

  70. Pingback引用通告: Cherekasi film 2020

  71. Pingback引用通告: film doktor_liza

  72. Pingback引用通告: djoker film

  73. Pingback引用通告: t.me/psyhell

  74. Pingback引用通告: Ïñèõîëîã îíëàéí

  75. Pingback引用通告: bitly.com

  76. Pingback引用通告: viagra 100mg

  77. Pingback引用通告: viagra price

  78. Pingback引用通告: viagra online

  79. Pingback引用通告: viagra generic

  80. Pingback引用通告: viagra coupon

  81. Pingback引用通告: cheap viagra

  82. Pingback引用通告: cialis

  83. Pingback引用通告: cialis coupon

  84. Pingback引用通告: canadian pharmacy cialis

  85. Pingback引用通告: cialis 5mg

  86. Pingback引用通告: bitly

  87. Pingback引用通告: movies-tekstmovies-tekst

  88. Pingback引用通告: Zemlyane 2005 smotret onlajn

  89. Pingback引用通告: smotret onlajn besplatno v kachestve hd 1080

  90. Pingback引用通告: gusmeasu.com

  91. Pingback引用通告: movies-unhinged-film

  92. Pingback引用通告: malenkie-zhenshhiny-2020

  93. Pingback引用通告: dom 2

  94. Pingback引用通告: zoom-psykholog

  95. Pingback引用通告: zoom-viber-skype

  96. Pingback引用通告: Vratar Galaktiki Film, 2020

  97. Pingback引用通告: Vratar

  98. Pingback引用通告: Cherkassy 2020

  99. Pingback引用通告: chernobyl-hbo-2019-1-sezon

  100. Pingback引用通告: moskva-psiholog

  101. Pingback引用通告: batmanapollo.ru

  102. Pingback引用通告: 323

  103. Pingback引用通告: 525

  104. Pingback引用通告: dom2-ru

  105. Pingback引用通告: Tenet Online

  106. Pingback引用通告: psy psy psy psy

  107. Pingback引用通告: krsmi.ru

  108. Pingback引用通告: like-v.ru

  109. Pingback引用通告: CFOSPUK

  110. Pingback引用通告: MAMprEj

  111. Pingback引用通告: fgu0ygW

  112. Pingback引用通告: batmanapollo

  113. Pingback引用通告: tsoy

  114. Pingback引用通告: 44548

  115. Pingback引用通告: 44549

  116. Pingback引用通告: hod-korolevy-2020

  117. Pingback引用通告: HD

  118. Pingback引用通告: 158444

  119. Pingback引用通告: groznyy-serial-2020

  120. Pingback引用通告: 38QvPmk

  121. Pingback引用通告: bitly.com/doctor-strange-hd

  122. Pingback引用通告: bitly.com/eternals-online

  123. Pingback引用通告: bitly.com/maior-grom

  124. Pingback引用通告: matrica-film

  125. Pingback引用通告: dzhonuikfilm4

  126. Pingback引用通告: bitly.com/batman20212022

  127. Pingback引用通告: bitly.com/venom-2-smotret-onlajn

  128. Pingback引用通告: bitly.com/nevremyaumirat

  129. Pingback引用通告: bitly.com/kingsmankingsman

  130. Pingback引用通告: bitly.com/3zaklyatie3

  131. Pingback引用通告: bitly.com/1dreykfilm

  132. Pingback引用通告: bitly.com/topgunmavericktopgun

  133. Pingback引用通告: bitly.com/flash2022

  134. Pingback引用通告: bitly.com/fantasticheskietvari3

  135. Pingback引用通告: bitly.com/wonderwoman1984hd

  136. Pingback引用通告: 1444

  137. Pingback引用通告: cleantalkorg2.ru

  138. Pingback引用通告: 232dfsad

  139. Pingback引用通告: cleantalkorg2.ru/sitemap.xml

  140. Pingback引用通告: join vk

  141. Pingback引用通告: vk login

  142. Pingback引用通告: svaty—7—sezon

  143. Pingback引用通告: svaty 7 sezon

  144. Pingback引用通告: svaty 7

  145. Pingback引用通告: tik tok

  146. Pingback引用通告: 666

  147. Pingback引用通告: The Revenant

  148. Pingback引用通告: 2021

  149. Pingback引用通告: D4

  150. Pingback引用通告: 777

  151. Pingback引用通告: link

  152. Pingback引用通告: 4569987

  153. Pingback引用通告: news news news

  154. Pingback引用通告: psy

  155. Pingback引用通告: psy2022

  156. Pingback引用通告: projectio-freid

  157. Pingback引用通告: kinoteatrzarya.ru

  158. Pingback引用通告: topvideos

  159. Pingback引用通告: afisha-kinoteatrov.ru

  160. Pingback引用通告: Ukrainskie-serialy

  161. Pingback引用通告: site

  162. Pingback引用通告: top

  163. Pingback引用通告: soderzhanki-3-sezon-2021.online

评论已关闭。