Hello,
Just not sure what to do at this point to react (where to put event handler, etc.) to the intent.
Here is a solution, you can handle this Intent in the OnCreate
method of MainActivity
like following code and verified the Intent is an Action.View and strLink is not empty.
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
Intent intent = this.Intent;
var action = intent.Action;
var strLink = intent.DataString;
if (Intent.ActionView == action && !string.IsNullOrWhiteSpace(strLink))
{
Toast.MakeText(this, strLink, ToastLength.Short).Show();
}
}
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.