How to navigate on specific page in Xamarin Forms iOS?


How to navigate on specific page in Xamarin Forms iOS?



I am using Xamarin Forms and working with ANH notification. I am able to receive Notification from ANH. But the problem is when I am receiving notification and try to open it from notification area I want to redirect on a specific page of notification in iOS. I have used PendingIntent on Android, But for iOS I have no idea.


Xamarin Forms


ANH


PendingIntent



Also, I want to display a badge on the tab when an app is open and received notification. I am using CustomRenderer for iOS. My code is for TabRenderer is :


CustomRenderer


public class BottomTabbedPage : TabbedRenderer
{
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
TabBar.UnselectedItemTintColor = UIColor.FromRGB(208,208,208);
TabBar.BackgroundColor = UIColor.White;
TabBar.Items[1].BadgeValue = SettingClass.MenuNotificationCount == 0 ? null : SettingClass.MenuNotificationCount.ToString();
TabBar.Items[2].BadgeValue = SettingClass.PromoNotificationCount == 0 ? null : SettingClass.PromoNotificationCount.ToString();
}
}



While App is starting badges will be displayed but when App is in background and notification is received count is increased but when the app is started badges are not updating. How can I solve this?




1 Answer
1



await App.Current.MainPage.Navigation.PushAsync(new specificPage());





But in iOS how can we identify app is opened from Notification?
– Srusti Thakkar
Jun 29 at 9:23





When the app is open the below method will be called. public override void OnActivated(UIApplication uiApplication).
– Ramya
Jun 29 at 9:27






Okay, Thanks I will check and try it.
– Srusti Thakkar
Jun 29 at 10:03






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV