FrieMonkey获取手机的IMSI等信息
- procedure THeaderFooterForm.FormCreate(Sender: TObject);
- var
- TelephonyManager: JTelephonyManager;
- TelephonyServiceNative: JObject;
- begin
- TelephonyServiceNative := SharedActivityContext.getSystemService
- (TJContext.JavaClass.TELEPHONY_SERVICE);
- if Assigned(TelephonyServiceNative) then
- TelephonyManager := TJTelephonyManager.Wrap
- ((TelephonyServiceNative as ILocalObject).GetObjectID);
- LabelIMEI.Text := LabelIMEI.Text + JStringToString(TelephonyManager.getDeviceId) ;//取IMEI
- LabelMsiSdn.Text := LabelMsiSdn.Text + JStringToString(TelephonyManager.getLine1Number) ;//取MSISDN 手机号,大部分SIM卡中不会写入这个信息
- LabelIccid.Text := LabelIccid.Text + JStringToString(TelephonyManager.getSimSerialNumber) ;//取ICCID
- LabelImsi.Text := labelimsi.Text + JStringToString(TelephonyManager.getSubscriberId) ; //取IMSI 运营商实际上是用这个查询的他那张对应电话号码的表
- //还有很多方法,具体请查看JTelephonyManager的声明
- end;
http://blog.csdn.net/warrially/article/details/37810237