how to know on which sim the incoming call is in my android app, in android studio. -


as can incoming call number in onreceive method using telephonymanager, there way number of receiving sim here? want both callers number , receivers number in app when call received . possible?

see below, work me.

    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 sim1     }     else if(callingsim =="1"){         // incoming call sim2     }     } } 

Comments

Popular posts from this blog

r - geom_bar tied exactly to x and y axis (without aggregating) -

php - Is there a way to specify only some optional function args? -

java - Spring-boot using RestTemplate -