Forum Xamarin Xamarin.Forms

Intent is null, when android app is minimized or closed.

Tanim3kTanim3k Member
edited August 2018 in Xamarin.Forms

I am getting intent extras null when application is minimized or closed. I am also using splash activity,

Project Info:
Xamarin.Firebase.Messaging 32.961.0

protected override void OnCreate(Bundle bundle)

        if (Intent.Extras != null)
            foreach (var key in Intent.Extras.KeySet())
                var value = Intent.Extras.GetString(key);
                if ("channelId".Equals(key) && !string.IsNullOrEmpty(value))
                    LocalStorageSettings.SelectedChannelId = Convert.ToInt32(value);

                    Xamarin.Forms.Device.BeginInvokeOnMainThread(async () =>
                        ((MasterDetailMainPage)App.Current.MainPage).Detail = new CustomNevigationPage(new ChannelListPage());
                        await ((MasterDetailMainPage)App.Current.MainPage).Detail.Navigation.PushAsync(new ChannelNoticeListPage());


  • your intent extras are going to splash activity if you want extra in main activity make main activity MainLauncher = true, in main activity use other approaches for splash screen.

Sign In or Register to comment.