Is it possible to get the phone number (SIM number) in delphi firemonkey? I am looking in forums for a few hours and I do not find any example the library that allows to get the number of the cell
Is it possible to get the phone number (SIM number) in delphi firemonkey? I am looking in forums for a few hours and I do not find any example the library that allows to get the number of the cell
If it's android:
uses
Androidapi.JNI.Telephony;
var
tMgr: JTelephonyManager;
PhoneNumber: String;
begin
tMgr := TJTelephonyManager.Wrap((SharedActivityContext.getSystemService(TJContext.JavaClass.TELEPHONY_SERVICE)
as ILocalObject).GetObjectID);
PhoneNumber := JStringToString(tMgr.getLine1Number);
end;