summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs b/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs
index 8eeeae09..6bd7df2b 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs
@@ -119,8 +119,11 @@ namespace Xamarin.Forms.Platform.Android
throw new ArgumentNullException("application");
_application = application;
+ (application as IApplicationController)?.SetAppIndexingProvider(new AndroidAppIndexProvider(this));
Xamarin.Forms.Application.Current = application;
+ CheckForAppLink(Intent);
+
application.PropertyChanged += AppOnPropertyChanged;
SetMainPage();
@@ -205,6 +208,7 @@ namespace Xamarin.Forms.Platform.Android
protected override void OnNewIntent(Intent intent)
{
base.OnNewIntent(intent);
+ CheckForAppLink(intent);
}
protected override void OnPause()
@@ -292,6 +296,17 @@ namespace Xamarin.Forms.Platform.Android
InternalSetPage(_application.MainPage);
}
+ void CheckForAppLink(Intent intent)
+ {
+ string action = intent.Action;
+ string strLink = intent.DataString;
+ if (Intent.ActionView != action || string.IsNullOrWhiteSpace(strLink))
+ return;
+
+ var link = new Uri(strLink);
+ _application?.SendOnAppLinkRequestReceived(link);
+ }
+
int GetColorPrimaryDark()
{
FormsAppCompatActivity context = this;