[BroadcastReceiver(Enabled =true,Exported = false)]
[IntentFilter(new[] { "android.Content.intent.PHONE_STATE"})]
public class IncomingCallReceiver : BroadcastReceiver
{
public override void OnReceive(Context context, Intent intent)
{
try
{
Console.WriteLine("Receiver start");
// Toast.MakeText(context, " Receiver start ", ToastLength.Long).Show();
}
catch (Exception e)
{
Console.WriteLine("Receiver start ex " + e.StackTrace);
}
}
}
public void Send()
{
var intent = new Intent(this, typeof(IncomingCallReceiver));
intent.PutExtra("selectedItemId", "item");
StartActivity(intent);
}
Unhandled Exception:
Android.Content.ActivityNotFoundException: Unable to find explicit activity class {androidcallerid.androidcallerid/md5db696f9a0e93a8df1577a4f1c7f26166.IncomingCallReceiver}; have you declared this activity in your AndroidManifest.xml?