brelto85 Active Member Licensed User Longtime User Feb 20, 2013 #1 hi, Is possible to determine if the "Activity_Resume" event fire, comes from changed orientation or clicking the notification icon? thanks alberto
hi, Is possible to determine if the "Activity_Resume" event fire, comes from changed orientation or clicking the notification icon? thanks alberto
barx Well-Known Member Licensed User Longtime User Feb 20, 2013 #2 Look at the notification documentation and check it's .SetTag property. If you use this then you will be able to detect starting from notification. Not sure for the orientation change, Maybe require a broadcast receiver? Upvote 0
Look at the notification documentation and check it's .SetTag property. If you use this then you will be able to detect starting from notification. Not sure for the orientation change, Maybe require a broadcast receiver?
brelto85 Active Member Licensed User Longtime User Feb 20, 2013 #3 my goal is to execute an action only if i click on the notification with tag property, the action is executed also changing orientation and also running application from application manager button Upvote 0
my goal is to execute an action only if i click on the notification with tag property, the action is executed also changing orientation and also running application from application manager button
brelto85 Active Member Licensed User Longtime User Feb 20, 2013 #5 i read it!! i have a service that runs in startforeground mode the service initialize a notification icon if i put that code into a Activity_resume event (Main Activity), it is executed also when change the orientation and also if resume application from task button Upvote 0
i read it!! i have a service that runs in startforeground mode the service initialize a notification icon if i put that code into a Activity_resume event (Main Activity), it is executed also when change the orientation and also if resume application from task button
Erel B4X founder Staff member Licensed User Longtime User Feb 21, 2013 #7 You should use SetInfo2 to set a tag to the notification. Add a process global variable of type Intent and add this code: Code: Copy Sub Activity_Resume If PrevIntent <> Activity.GetStartingIntent Then 'check the tag Else 'do nothing as it is an old intent End If PrevIntent = Activity.GetStartingIntent Upvote 0
You should use SetInfo2 to set a tag to the notification. Add a process global variable of type Intent and add this code: Code: Copy Sub Activity_Resume If PrevIntent <> Activity.GetStartingIntent Then 'check the tag Else 'do nothing as it is an old intent End If PrevIntent = Activity.GetStartingIntent