Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/04/20 in Posts

  1. Maher Tannous

    Call from sim 2

    Thank you very much this is my working code 1- Use this unit https://github.com/DelphiWorlds/KastriFree/blob/master/API/DW.Androidapi.JNI.Telecom.pas 2- procedure CallByPhoneNumber(const PhoneNumber: string; SIMindex: Integer); var Intent: JIntent; LService: JObject; LAccounts: JList; begin LService := TAndroidHelper.Context.getSystemService (TJContext.JavaClass.TELECOM_SERVICE); Intent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_CALL); Intent.setFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK); Intent.setData(TJnet_Uri.JavaClass.parse(StringToJString('tel:' + JStringToString(TJnet_Uri.JavaClass.encode(StringToJString (PhoneNumber)))))); Intent.putExtra(StringToJString('com.android.phone.force.slot'), true); Intent.putExtra(StringToJString('Cdma_Supp'), true); Intent.putExtra(StringToJString('extra_asus_dial_use_dualsim'), SIMindex); Intent.putExtra(StringToJString('com.android.phone.extra.slot'), SIMindex); Intent.putExtra(StringToJString('slot'), SIMindex); Intent.putExtra(StringToJString('simslot'), SIMindex); Intent.putExtra(StringToJString('sim_slot'), SIMindex); Intent.putExtra(StringToJString('subscription'), SIMindex); Intent.putExtra(StringToJString('Subscription'), SIMindex); Intent.putExtra(StringToJString('phone'), SIMindex); Intent.putExtra(StringToJString('com.android.phone.DialingMode'), SIMindex); Intent.putExtra(StringToJString('simSlot'), SIMindex); Intent.putExtra(StringToJString('slot_id'), SIMindex); Intent.putExtra(StringToJString('simId'), SIMindex); Intent.putExtra(StringToJString('simnum'), SIMindex); Intent.putExtra(StringToJString('phone_type'), SIMindex); Intent.putExtra(StringToJString('slotId'), SIMindex); Intent.putExtra(StringToJString('slotIdx'), SIMindex); Intent.putExtra(StringToJString('simSlotName'), SIMindex); LAccounts := TJTelecomManager.Wrap(TAndroidHelper.JObjectToID(LService)) .getCallCapablePhoneAccounts; if LAccounts <> nil then Intent.putExtra (StringToJString('android.telecom.extra.PHONE_ACCOUNT_HANDLE'), TJPhoneAccountHandle.Wrap(TAndroidHelper.JObjectToID (LAccounts.get(SIMindex)))); TAndroidHelper.Context.startActivity(Intent); end; 3- CallByPhoneNumber(mobilenumber, 0); or CallByPhoneNumber(mobilenumber, 1);
  2. David Heffernan

    IDE Screenshot too large?

    https://devblogs.microsoft.com/oldnewthing/20150304-00/?p=44543 https://devblogs.microsoft.com/oldnewthing/20120326-00/?p=8003
  3. Jose Morango

    AES Encryption - FMX

    HI, Try Tms CryptoGrapy Pack, runs on VCL, FMX, I'm using it on my android and iOS apps adn it work just fine.
×