D Deleted member 103 Guest Mar 14, 2016 #1 Hi, 2 Activity and a behavior I do not understand. I activate Activity-2 and send it in the background. 1) when I start the app from the display then Activity-2 is open. 2) when I start the app from status bar then Activity-1 open. Is that correct so or I do something wrong? Should not be always Activity 2 opened? Attachments Activity2.zip Activity2.zip 11.4 KB · Views: 506
Hi, 2 Activity and a behavior I do not understand. I activate Activity-2 and send it in the background. 1) when I start the app from the display then Activity-2 is open. 2) when I start the app from status bar then Activity-1 open. Is that correct so or I do something wrong? Should not be always Activity 2 opened?
somed3v3loper Well-Known Member Licensed User Longtime User Mar 14, 2016 #2 How about this ? Code: n.SetInfo("Activity2","", m2) Upvote 0
DonManfred Expert Licensed User Longtime User Mar 14, 2016 #3 Filippo said: Should not be always Activity 2 opened? Click to expand... Only one Activity can be in foreground. Filippo said: I activate Activity-2 and send it in the background. 1) when I start the app from the display then Activity-2 is open. Click to expand... This is because the starter service reactiivate act2. Filippo said: 2) when I start the app from status bar then Activity-1 open. Click to expand... This happens because you set Main as the Activity to use in your notification. Upvote 0
Filippo said: Should not be always Activity 2 opened? Click to expand... Only one Activity can be in foreground. Filippo said: I activate Activity-2 and send it in the background. 1) when I start the app from the display then Activity-2 is open. Click to expand... This is because the starter service reactiivate act2. Filippo said: 2) when I start the app from status bar then Activity-1 open. Click to expand... This happens because you set Main as the Activity to use in your notification.
D Deleted member 103 Guest Mar 15, 2016 #4 @somed3v3loper thanks for the answer. @DonManfred This happens because you set Main as the Activity to use in your notification. Click to expand... That is when I should change to "Sub Activity Pause" the notification, for example, so? Activity-Main: Code: Sub Activity_Pause (UserClosed As Boolean) If UserClosed Then StopService(Starter) ExitApplication Else Starter.n.SetInfo("Activity2","", Me) End If End Sub Activity-2: Code: Sub Activity_Pause (UserClosed As Boolean) If Not(UserClosed) Then Starter.n.SetInfo("Activity2","", Me) End If End Sub I will just try it. Upvote 0
@somed3v3loper thanks for the answer. @DonManfred This happens because you set Main as the Activity to use in your notification. Click to expand... That is when I should change to "Sub Activity Pause" the notification, for example, so? Activity-Main: Code: Sub Activity_Pause (UserClosed As Boolean) If UserClosed Then StopService(Starter) ExitApplication Else Starter.n.SetInfo("Activity2","", Me) End If End Sub Activity-2: Code: Sub Activity_Pause (UserClosed As Boolean) If Not(UserClosed) Then Starter.n.SetInfo("Activity2","", Me) End If End Sub I will just try it.
D Deleted member 103 Guest Mar 15, 2016 #5 OK, I've tried, so it does not go! It's better if I leave the Notification off. Or is there a different way? Upvote 0
OK, I've tried, so it does not go! It's better if I leave the Notification off. Or is there a different way?
Erel B4X founder Staff member Licensed User Longtime User Mar 15, 2016 #6 Calling SetInfo without calling Notify will not do anything. Upvote 0