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

c++ - CPP, 'X' button listener -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -

shared memory - gstreamer shmsrc and shmsink with h264 data -