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;
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
add a comment |
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
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
add a comment |
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
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
xamarin.forms push-notification xamarin.android firebase-cloud-messaging prism
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
Updated the post with answer.
I am not very sure on answer (any side effects), but it works!!!
Thanks to
stackoverflow post
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Updated the post with answer.
I am not very sure on answer (any side effects), but it works!!!
Thanks to
stackoverflow post
add a comment |
Updated the post with answer.
I am not very sure on answer (any side effects), but it works!!!
Thanks to
stackoverflow post
add a comment |
Updated the post with answer.
I am not very sure on answer (any side effects), but it works!!!
Thanks to
stackoverflow post
Updated the post with answer.
I am not very sure on answer (any side effects), but it works!!!
Thanks to
stackoverflow post
edited Mar 26 at 7:31
answered Mar 26 at 7:24
Phani Krishna VemireddyPhani Krishna Vemireddy
439
439
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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