Xamarin Forms:Prism MVVM:Android:Navigate to specific page when click on Push NotificationPrism with Xamarin for Android - InvalidOperationException on LaunchMasterDetail and NavigationPage deeplinking in Prism FormsINavigationService as MainPage constructor argumentNavigation with Xamarin.FormsXamarin Forms: Prism — Issue with using unity IoC?FCM Click Event With Xamarin FormsPrism navigation from within a Service only working when not navigating back to muchMVVM Navigation Force Close Xamarin FormsPrism Xamarin Forms INavigationService GoBackAsync not returning to previous pageXamarin Forms - Processing a Notification ClickXamarin Forms:Prism:Android:MainActivity: Click on Push Notifications: PushAsync not supported globally on Android, please use a NavigationPage

Scaling rounded rectangles in Illustrator

How can I test a shell script in a "safe environment" to avoid harm to my computer?

Is there a reason why Turkey took the Balkan territories of the Ottoman Empire, instead of Greece or another of the Balkan states?

Are modes in jazz primarily a melody thing?

Can you just subtract the challenge rating of friendly NPCs?

What's the difference between "ricochet" and "bounce"?

Can anyone identify this unknown 1988 PC card from The Palantir Corporation?

Was there a dinosaur-counter in the original Jurassic Park movie?

Antivirus for Ubuntu 18.04

My large rocket is still flipping over

How can I finally understand the confusing modal verb "мочь"?

Good introductory book to type theory?

My parents are Afghan

How is it believable that Euron could so easily pull off this ambush?

Select list elements based on other list

Can I use LPGL3 for library and Apache 2 for "main()"?

Explaining intravenous drug abuse to a small child

What is the meaning of "matter" in physics?

What does the copyright in a dissertation protect exactly?

When does WordPress.org notify sites of new version?

Did any early RISC OS precursor run on the BBC Micro?

Average of samples in a period of time

Game artist computer workstation set-up – is this overkill?

How do I minimise waste on a flight?



Xamarin Forms:Prism MVVM:Android:Navigate to specific page when click on Push Notification


Prism with Xamarin for Android - InvalidOperationException on LaunchMasterDetail and NavigationPage deeplinking in Prism FormsINavigationService as MainPage constructor argumentNavigation with Xamarin.FormsXamarin Forms: Prism — Issue with using unity IoC?FCM Click Event With Xamarin FormsPrism navigation from within a Service only working when not navigating back to muchMVVM Navigation Force Close Xamarin FormsPrism Xamarin Forms INavigationService GoBackAsync not returning to previous pageXamarin Forms - Processing a Notification ClickXamarin Forms:Prism:Android:MainActivity: Click on Push Notifications: PushAsync not supported globally on Android, please use a NavigationPage






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am trying to implement a basic push notification example using
Xamarin Forms with Prism MVVM, Azure & FCM.



I am receiving notification, but couldn't navigate to a specific page when clicked on the notification.



Trying basic functionality when the app is running or in the background (not closed).



When click on notification, need to navigate to MainPage as shown in below code).



It is calling MainPage, but, not initializing ViewModel (MainPageViewModel).



I am not very sure, is this the right way of navigating from Android project.



Similar code worked fine in iOS.



protected override void OnNewIntent(Intent intent)

base.OnNewIntent(intent);
Intent = intent;
var page = new NavigationPage(new MainPage());
Prism.PrismApplicationBase.Current.MainPage = page;



Any hints, please...!



Updated.... Answer



protected override void OnNewIntent(Intent intent)

base.OnNewIntent(intent);
Intent = intent;

//var page = new NavigationPage(new MainPage());
//Prism.PrismApplicationBase.Current.MainPage = page;

var container = (App.Current as Prism.Unity.PrismApplication).Container;
var navigationService = container.Resolve<INavigationService>();
navigationService.NavigateAsync("/NavigationPage/MainPage");



and added below registration in App.xaml.cs file



protected override void RegisterTypes(IContainerRegistry containerRegistry)

containerRegistry.Register<Prism.Navigation.INavigationService,
Prism.Navigation.PageNavigationService>();










share|improve this question
























  • On what version of android did you test?

    – AbbyWang - MSFT
    Mar 26 at 2:07











  • I am testing using Nokia 8.1 which is on API 28 (PIE)

    – Phani Krishna Vemireddy
    Mar 26 at 5:40











  • Apps that are running on Android 8.0 (API level 26) or higher must create a notification channel for publishing their notifications.

    – AbbyWang - MSFT
    Mar 26 at 6:55











  • @AbbyWang-MSFT I am receiving notifications, but had problem with navigating to a page.

    – Phani Krishna Vemireddy
    Mar 26 at 7:23

















0















I am trying to implement a basic push notification example using
Xamarin Forms with Prism MVVM, Azure & FCM.



I am receiving notification, but couldn't navigate to a specific page when clicked on the notification.



Trying basic functionality when the app is running or in the background (not closed).



When click on notification, need to navigate to MainPage as shown in below code).



It is calling MainPage, but, not initializing ViewModel (MainPageViewModel).



I am not very sure, is this the right way of navigating from Android project.



Similar code worked fine in iOS.



protected override void OnNewIntent(Intent intent)

base.OnNewIntent(intent);
Intent = intent;
var page = new NavigationPage(new MainPage());
Prism.PrismApplicationBase.Current.MainPage = page;



Any hints, please...!



Updated.... Answer



protected override void OnNewIntent(Intent intent)

base.OnNewIntent(intent);
Intent = intent;

//var page = new NavigationPage(new MainPage());
//Prism.PrismApplicationBase.Current.MainPage = page;

var container = (App.Current as Prism.Unity.PrismApplication).Container;
var navigationService = container.Resolve<INavigationService>();
navigationService.NavigateAsync("/NavigationPage/MainPage");



and added below registration in App.xaml.cs file



protected override void RegisterTypes(IContainerRegistry containerRegistry)

containerRegistry.Register<Prism.Navigation.INavigationService,
Prism.Navigation.PageNavigationService>();










share|improve this question
























  • On what version of android did you test?

    – AbbyWang - MSFT
    Mar 26 at 2:07











  • I am testing using Nokia 8.1 which is on API 28 (PIE)

    – Phani Krishna Vemireddy
    Mar 26 at 5:40











  • Apps that are running on Android 8.0 (API level 26) or higher must create a notification channel for publishing their notifications.

    – AbbyWang - MSFT
    Mar 26 at 6:55











  • @AbbyWang-MSFT I am receiving notifications, but had problem with navigating to a page.

    – Phani Krishna Vemireddy
    Mar 26 at 7:23













0












0








0


1






I am trying to implement a basic push notification example using
Xamarin Forms with Prism MVVM, Azure & FCM.



I am receiving notification, but couldn't navigate to a specific page when clicked on the notification.



Trying basic functionality when the app is running or in the background (not closed).



When click on notification, need to navigate to MainPage as shown in below code).



It is calling MainPage, but, not initializing ViewModel (MainPageViewModel).



I am not very sure, is this the right way of navigating from Android project.



Similar code worked fine in iOS.



protected override void OnNewIntent(Intent intent)

base.OnNewIntent(intent);
Intent = intent;
var page = new NavigationPage(new MainPage());
Prism.PrismApplicationBase.Current.MainPage = page;



Any hints, please...!



Updated.... Answer



protected override void OnNewIntent(Intent intent)

base.OnNewIntent(intent);
Intent = intent;

//var page = new NavigationPage(new MainPage());
//Prism.PrismApplicationBase.Current.MainPage = page;

var container = (App.Current as Prism.Unity.PrismApplication).Container;
var navigationService = container.Resolve<INavigationService>();
navigationService.NavigateAsync("/NavigationPage/MainPage");



and added below registration in App.xaml.cs file



protected override void RegisterTypes(IContainerRegistry containerRegistry)

containerRegistry.Register<Prism.Navigation.INavigationService,
Prism.Navigation.PageNavigationService>();










share|improve this question
















I am trying to implement a basic push notification example using
Xamarin Forms with Prism MVVM, Azure & FCM.



I am receiving notification, but couldn't navigate to a specific page when clicked on the notification.



Trying basic functionality when the app is running or in the background (not closed).



When click on notification, need to navigate to MainPage as shown in below code).



It is calling MainPage, but, not initializing ViewModel (MainPageViewModel).



I am not very sure, is this the right way of navigating from Android project.



Similar code worked fine in iOS.



protected override void OnNewIntent(Intent intent)

base.OnNewIntent(intent);
Intent = intent;
var page = new NavigationPage(new MainPage());
Prism.PrismApplicationBase.Current.MainPage = page;



Any hints, please...!



Updated.... Answer



protected override void OnNewIntent(Intent intent)

base.OnNewIntent(intent);
Intent = intent;

//var page = new NavigationPage(new MainPage());
//Prism.PrismApplicationBase.Current.MainPage = page;

var container = (App.Current as Prism.Unity.PrismApplication).Container;
var navigationService = container.Resolve<INavigationService>();
navigationService.NavigateAsync("/NavigationPage/MainPage");



and added below registration in App.xaml.cs file



protected override void RegisterTypes(IContainerRegistry containerRegistry)

containerRegistry.Register<Prism.Navigation.INavigationService,
Prism.Navigation.PageNavigationService>();







xamarin.forms push-notification xamarin.android firebase-cloud-messaging prism






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 7:22







Phani Krishna Vemireddy

















asked Mar 23 at 6:17









Phani Krishna VemireddyPhani Krishna Vemireddy

439




439












  • On what version of android did you test?

    – AbbyWang - MSFT
    Mar 26 at 2:07











  • I am testing using Nokia 8.1 which is on API 28 (PIE)

    – Phani Krishna Vemireddy
    Mar 26 at 5:40











  • Apps that are running on Android 8.0 (API level 26) or higher must create a notification channel for publishing their notifications.

    – AbbyWang - MSFT
    Mar 26 at 6:55











  • @AbbyWang-MSFT I am receiving notifications, but had problem with navigating to a page.

    – Phani Krishna Vemireddy
    Mar 26 at 7:23

















  • On what version of android did you test?

    – AbbyWang - MSFT
    Mar 26 at 2:07











  • I am testing using Nokia 8.1 which is on API 28 (PIE)

    – Phani Krishna Vemireddy
    Mar 26 at 5:40











  • Apps that are running on Android 8.0 (API level 26) or higher must create a notification channel for publishing their notifications.

    – AbbyWang - MSFT
    Mar 26 at 6:55











  • @AbbyWang-MSFT I am receiving notifications, but had problem with navigating to a page.

    – Phani Krishna Vemireddy
    Mar 26 at 7:23
















On what version of android did you test?

– AbbyWang - MSFT
Mar 26 at 2:07





On what version of android did you test?

– AbbyWang - MSFT
Mar 26 at 2:07













I am testing using Nokia 8.1 which is on API 28 (PIE)

– Phani Krishna Vemireddy
Mar 26 at 5:40





I am testing using Nokia 8.1 which is on API 28 (PIE)

– Phani Krishna Vemireddy
Mar 26 at 5:40













Apps that are running on Android 8.0 (API level 26) or higher must create a notification channel for publishing their notifications.

– AbbyWang - MSFT
Mar 26 at 6:55





Apps that are running on Android 8.0 (API level 26) or higher must create a notification channel for publishing their notifications.

– AbbyWang - MSFT
Mar 26 at 6:55













@AbbyWang-MSFT I am receiving notifications, but had problem with navigating to a page.

– Phani Krishna Vemireddy
Mar 26 at 7:23





@AbbyWang-MSFT I am receiving notifications, but had problem with navigating to a page.

– Phani Krishna Vemireddy
Mar 26 at 7:23












1 Answer
1






active

oldest

votes


















0














Updated the post with answer.

I am not very sure on answer (any side effects), but it works!!!

Thanks to
stackoverflow post






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311157%2fxamarin-formsprism-mvvmandroidnavigate-to-specific-page-when-click-on-push-no%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Updated the post with answer.

    I am not very sure on answer (any side effects), but it works!!!

    Thanks to
    stackoverflow post






    share|improve this answer





























      0














      Updated the post with answer.

      I am not very sure on answer (any side effects), but it works!!!

      Thanks to
      stackoverflow post






      share|improve this answer



























        0












        0








        0







        Updated the post with answer.

        I am not very sure on answer (any side effects), but it works!!!

        Thanks to
        stackoverflow post






        share|improve this answer















        Updated the post with answer.

        I am not very sure on answer (any side effects), but it works!!!

        Thanks to
        stackoverflow post







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 26 at 7:31

























        answered Mar 26 at 7:24









        Phani Krishna VemireddyPhani Krishna Vemireddy

        439




        439





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55311157%2fxamarin-formsprism-mvvmandroidnavigate-to-specific-page-when-click-on-push-no%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현