I am using PhoneStateListener to detect calls
Code that I am using is :
public class PhoneCallDetector : PhoneStateListener
{
Context context;
public PhoneCallDetector(Context cntxt)
{
this.context = cntxt;
}
public override void OnCallStateChanged(CallState state, string incomingNumber)
{
if (state == CallState.Ringing)
{
Toast.MakeText(context, incomingNumber, ToastLength.Long).Show();
}
}
}
In lollipop the Incoming no is showing but in Kitkat or Marshmallow the no is always blank.....