简体   繁体   English

单击通知时如何打开特定片段

[英]how to open particular fragment when notification is clicked

I have a notification in notification bar and i have 3 fragments in one of my activity. 我在通知栏中有一个通知,我的一项活动中有3个片段。 i want when i click the notification it will open particular fragment, Like what facebook notification do. 我想要当我单击通知时,它将打开特定的片段,就像Facebook通知那样。 I tried to search it on google n everywhere else but didnot match what i need. 我试图在Google N上的其他任何地方进行搜索,但与我需要的不匹配。 Example: i have 3 fragments 1 - for redeem value. 示例:我有3个片段1-兑换价值。 2 - for recharge. 2-充电。 3 - for anything. 3-什么。

Now if i get notification from Admin Panel like you can redeem your value, then that notification will open that particular fragment. 现在,如果我从管理面板收到通知(如可以兑换您的值),则该通知将打开该特定片段。 If i get notification to recharge then it will open that particular fragment like this i want all working. 如果我收到充电通知,它将像这样打开特定的片段,我希望所有片段都能正常工作。

Hope you clear, if not then please let me know. 希望您能清除,否则请通知我。

您可以将此链接用于片段中的打开通知,应为其使用“待处理的意图”,并使用名称设置片段并使用待处理的意图将其打开, link1 link2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 单击通知时如何打开活动中的特定片段 - how to open particular fragment which in an activity when notification is clicked 单击通知选项卡中的推送通知消息,如何打开特定片段? - How to open the particular fragment on the click of the push notification message in the notification tab? 在 android 中单击通知时如何打开应用程序? - How to open app when notification is clicked in android? 单击推送通知消息时如何打开特定片段? - How to open particular fragment on the click of the push notification message? 单击该活动如何打开启动通知的活动? - How to open the activity that launched a notification when clicked on it? 单击通知时如何选择要打开的活动 - How to choice activity to open when notification clicked FCM-单击系统任务栏通知时如何遍历特定活动 - FCM - How to traverse to a particular activity when system tray notification is clicked 单击通知时打开应用程序 - Open application when notification is clicked 单击带有Firebase的通知时打开通知活动 - Open Notification activity when clicked on Notification with firebase 单击recyclerview项时如何打开viewpager片段 - How to open a viewpager fragment when a recyclerview item is clicked
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM