D Darknight20 Member Jan 31, 2021 #1 Hi i use nb6 for show notification for sample i use this code: Code: Dim n As NB6 n.Initialize("default3", "Class", "HIGH").AutoCancel(True).OnGoing(False).SmallIcon(Application.Icon) n.SetDefaults(True, True, True) n.Build("Error", "Helllllo", "status", test) when i click on notification, activity will start and if i replace activity with service class and click on notification, nothing happen so, i want start service and handle intent in service when i clicked on notification! How can do this? sorry for bad translation. thanks
Hi i use nb6 for show notification for sample i use this code: Code: Dim n As NB6 n.Initialize("default3", "Class", "HIGH").AutoCancel(True).OnGoing(False).SmallIcon(Application.Icon) n.SetDefaults(True, True, True) n.Build("Error", "Helllllo", "status", test) when i click on notification, activity will start and if i replace activity with service class and click on notification, nothing happen so, i want start service and handle intent in service when i clicked on notification! How can do this? sorry for bad translation. thanks
Erel B4X founder Staff member Licensed User Longtime User Feb 1, 2021 #2 Clicking on the notification will always start an activity. You can immediately close the activity. You can also add actions that will start services: https://www.b4x.com/android/forum/threads/nb6-notifications-builder-class-2018.91819/#content Upvote 0
Clicking on the notification will always start an activity. You can immediately close the activity. You can also add actions that will start services: https://www.b4x.com/android/forum/threads/nb6-notifications-builder-class-2018.91819/#content