
OnCallStateChanged(context, state, number) State = TelephonyManager.CALL_STATE_RINGING State = TelephonyManager.CALL_STATE_OFFHOOK Įlse if(stateStr.equals(TelephonyManager.EXTRA_STATE_RINGING)) State = TelephonyManager.CALL_STATE_IDLE Įlse if(stateStr.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) If(stateStr.equals(TelephonyManager.EXTRA_STATE_IDLE))

String number = intent.getExtras().getString(TelephonyManager.EXTRA_INCOMING_NUMBER) String stateStr = intent.getExtras().getString(TelephonyManager.EXTRA_STATE) SavedNumber = intent.getExtras().getString("_NUMBER") If (intent.getAction().equals("_OUTGOING_CALL")) Private static String void onReceive(Context context, Intent intent) Private static int lastState = TelephonyManager.CALL_STATE_IDLE Public abstract class PhonecallReceiver extends BroadcastReceiver In this, I make some methods which I am using in CallReceiver.java

This is my receiver class by which I am getting the Call State that the call is starts or ends. I am trying to implement the app similar to true caller,I am able to get the phone number when the phone rings using broadcast receiver and opening the M圜ustomDialog Activity
