Hello,
Welcome to our Microsoft Q&A platform!
But in this case, there is no splash screen. Only a white sceen is shown.
To display the splash screen when using deeplinking, please move the IntentFilter
configuration from MainActivity to SplashActivity as below.
[Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)]
[IntentFilter(new[] { Android.Content.Intent.ActionView },
Categories = new[] { Android.Content.Intent.CategoryDefault, Android.Content.Intent.CategoryLauncher, Android.Content.Intent.CategoryBrowsable },
AutoVerify = true,
DataSchemes = new[] { "http", "https", "" }
)]
public class SplashActivity : Android.App.Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
string action = Intent.Action;
string strLink = Intent.DataString;
Intent intent = new Intent(Application.Context, typeof(MainActivity));
if (Android.Content.Intent.ActionView == action && !string.IsNullOrWhiteSpace(strLink))
{
intent.SetAction(Intent.ActionView);
intent.SetData(Intent.Data);
}
StartActivity(intent);
}
}
And to test this function, please close your application on the device first.
Best Regards,
Jarvan Zhang
If the response is helpful, 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.