Hi all!
Next little problem in my app:
I have realized a "no action service" which is active when user do nothing in my app. This can be happen on every activity in my app.
But after the initialization of my notification object with ...
... and after the using in this command ...
... I cannot change the target activity.
So I tried to stop the foreground service by this first ...
... in order to build a new notification object and a new "StartForeground" command with new activity "MyActivity2".
But when I click on this notification object in the notification bar, there is always a jump to "MyActivity" activity, as created before.
Is there any other way to "replace" the target activity in such a notification object?
The big problem is: When I click on the notification object, the already opened activity remains opened and will not be closed.
I also inform my dynamic service about my current activity.
For this I use always the "Me" object in each activity.
Question: Is this the correct object in each activity or should I take "Activity" in order to get the current activity object?
I am thankful for all help here!
Regards
ARTsoft
Next little problem in my app:
I have realized a "no action service" which is active when user do nothing in my app. This can be happen on every activity in my app.
But after the initialization of my notification object with ...
B4X:
Dim notification As Notification
notification.Initialize2(notification.IMPORTANCE_LOW)
notification.Sound = False
notification.Insistent = False
notification.Vibrate = False
notification.Icon = "icon"
notification.Light = False
notification.OnGoingEvent = True
notification.AutoCancel = True
notification.SetInfo("MyApp", "Hallo World!", MyActivity)
... and after the using in this command ...
B4X:
Service.StartForeground(1, notification)
... I cannot change the target activity.
So I tried to stop the foreground service by this first ...
B4X:
Service.StopForeground(1)
... in order to build a new notification object and a new "StartForeground" command with new activity "MyActivity2".
But when I click on this notification object in the notification bar, there is always a jump to "MyActivity" activity, as created before.
Is there any other way to "replace" the target activity in such a notification object?
The big problem is: When I click on the notification object, the already opened activity remains opened and will not be closed.
I also inform my dynamic service about my current activity.
For this I use always the "Me" object in each activity.
Question: Is this the correct object in each activity or should I take "Activity" in order to get the current activity object?
I am thankful for all help here!
Regards
ARTsoft
Last edited: