Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect target phone number on incoming call is it for SIM 1 or for SIM 2?

I have an Android phone with 2 SIM card and I want to detect the target of the incoming call — is it for SIM 1 or for SIM 2. Is it possible to get the target number from call info?

like image 882
Jebasuthan Avatar asked Jan 28 '14 04:01

Jebasuthan


People also ask

How do you identify incoming call is it for SIM 1 or for SIM2?

If you do have 2 sim cards installed on the phone it should have given you the option to play different ring tones. If the option did not come up call the first number and set the ring tone to a different sound then call the other number and see if they are different.

How do you know which number is being called on a Dual SIM iPhone?

If we understand correctly, you are looking for info on how to identify what number is being called on your iPhone with Dual SIM. When a call is received you should see a letter in a box below the name of the person or number that is calling.

Can I receive calls on Dual SIM phones?

Dual SIM Dual Standby (DSDS)You can receive calls and messages to both SIM cards. Before you can use the SIM cards, you have to enable them in the Dual SIM settings menu. Data traffic can only be handled on one SIM card at a time and you can select which SIM card you want to use.

How do I find out which SIM is receiving the incoming call in an Android Dual SIM phone?

To identify the SIM number you are getting the incoming call on you can simply open the call log on dialer app and tap on the contest you want to know the SIM number the call was received. Usually, in case of incoming calls, you can simply identify the SIM number by looking at the bottom of the in-call UI screen.

How do I know if an incoming call is on another number?

Android 9.0Find and tap Phone. Tap the menu button (three vertical dots), then tap Settings. Tap Calls → Additional settings. Tap the switch beside Call waiting to enable the function.

Is there any Dual SIM phone where we are on call on SIM 1 and when another person calls on the 2nd SIM the opposite person hears the ring but we get a call waiting?

Yes only on mobile with dual volte enabled phones can be used simultaneously. but not for call one can use data services from one number and call for the other. On all the other mobiles all the services on other services of the other sim are terminated for the time being.


2 Answers

Finally I got the solution using this code. Hope it should helpful for everyone who wants to handle Dual SIM phones. Its working fine for me.

Please add below codes in your BroadcastReceiver class:

public class IncomingCallInterceptor extends BroadcastReceiver {
@Override
    public void onReceive(Context context, Intent intent) {
    String callingSIM = "";
    Bundle bundle = intent.getExtras();
    callingSIM =String.valueOf(bundle.getInt("simId", -1));
    if(callingSIM == "0"){
        // Incoming call from SIM1
    }
    else if(callingSIM =="1"){
        // Incoming call from SIM2
    }
    }
}
like image 138
Jebasuthan Avatar answered Oct 14 '22 00:10

Jebasuthan


add below codes in your BroadcastReceiver class.

public class IncomingCallInterceptorReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String callingFromSIM = "";
Bundle bundle = intent.getExtras();
callingFromSIM =String.valueOf(bundle.getInt("simId", -1));
if(callingFromSIM == "0"){

    // Incoming call from SIM1 Card

}
else if(callingFromSIM =="1"){

    // Incoming call from SIM2 Card 

}

}

}
like image 32
Vaishali Sutariya Avatar answered Oct 14 '22 01:10

Vaishali Sutariya