Share via

Xamarin.Android IntentFilter DataSchemes issue

Yongqing Huang 241 Reputation points
2022-01-14T08:36:26.4+00:00

Hi,
Our Xamarin.Android app is used to respond to open an URL in SMS or email.

code in App.xaml.cs:

protected override void OnAppLinkRequestReceived(Uri uri)
{
base.OnAppLinkRequestReceived(uri);
...

We would like to have respond to an URL without http:// or https://, too.
For example: learn.microsoft.com

I tried twice by changing code to DataSchemes = new[] { "http", "https", "" } and DataSchemes = new[] { "http", "https", "*" }

It worked by SMS (Messages) , but not by email (Outlook)

How to specify DataSchemes?

respond to learn.microsoft.com when click it in email (Outlook):

165065-capture.jpg

Developer technologies | .NET | Xamarin
0 comments No comments

Answer accepted by question author

Anonymous
2022-01-17T05:53:16.357+00:00

Hello Yongqing,​

Welcome to our Microsoft Q&A platform!

Based on your screenshot, I notice you open this URL in the Outlook app by internal Webview.

Please open the settings in the Outlook. scroll down, find the Preferences, enable the Use default browser selection, then you can open this URL by your application(If you set your application as default browser in your Android device).

Your DataSchemes = new[] { "http", "https", "" } is worked in my side.

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.

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. Yongqing Huang 241 Reputation points
    2022-01-17T11:01:07.147+00:00

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.