I neeed to detect target sim card of incoming call on multiple sim devices. I have tired a lot of posts and tried many solutions, but all the solutions are outdated. Not working on newer version of Android.
I tried the below solutions, nothing helps
    int simSlot = intent.getIntExtra("simSlot", -1);
    int simId = intent.getIntExtra("simId", -1);
    int slot = intent.getIntExtra("slot", -1);
These all are returns -1
String[] array = new String[]{
        "extra_asus_dial_use_dualsim",
        "com.android.phone.extra.slot",
        "slot",
        "simslot",
        "sim_slot",
        "subscription",
        "Subscription",
        "phone",
        "com.android.phone.DialingMode",
        "simSlot",
        "slot_id",
        "simId",
        "simnum",
        "phone_type",
        "slotId",
        "slotIdx"
};
for (String item :
        array) {
    Log.i(TAG, "Sim Card - " + item + " -----> " + intent.getExtras().getInt(item));
}
The output is always returns 0
Some articles shows it's not possible. But TrueCaller shows the target simcard for all incomming calls in all android mobiles.
I want to know solution like this
I tried so many ways nothing helps. Any help will be highly appriciated. Thanks in advance

 
    