peacemaker Expert Licensed User Longtime User Apr 8, 2014 #1 Why such error happened ? App has many activities, but no StartActivity (Main) specially. But sometimes when i open another activity - this happens and Main is started again. Main activity uses OSM lib.
Why such error happened ? App has many activities, but no StartActivity (Main) specially. But sometimes when i open another activity - this happens and Main is started again. Main activity uses OSM lib.
Erel B4X founder Staff member Licensed User Longtime User Apr 8, 2014 #2 This is not an error. It tells you that two instances of the same activity were created. The first one was then destroyed. It usually happens when you open an activity from a notification. Upvote 0
This is not an error. It tells you that two instances of the same activity were created. The first one was then destroyed. It usually happens when you open an activity from a notification.
peacemaker Expert Licensed User Longtime User Apr 8, 2014 #3 Aha, yes, notifications are used, but i did not tap it - it needs to pull out ..... you know. Upvote 0
peacemaker Expert Licensed User Longtime User Apr 9, 2014 #4 Can it be due to CallSub or CallSubDelayed ? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Apr 10, 2014 #5 Does it cause any issue? Upvote 0
peacemaker Expert Licensed User Longtime User Apr 10, 2014 #6 I have added checking if IsPaused (Main) = false then Call....... and, seems, no killing now.... need to check longer. Upvote 0
I have added checking if IsPaused (Main) = false then Call....... and, seems, no killing now.... need to check longer.
peacemaker Expert Licensed User Longtime User Apr 15, 2014 #7 No, no luck. I even cannot open well other activities - after some pause - the killing, and Main activity is restarted. App is used MapView (OSR) lib on the Main. The service woring with a server updates the SQLite db and call Code: If IsPaused(Main) = False Then CallSubDelayed(Main, "Activity_Resume") End If Where markers of the map are being updated. Upvote 0
No, no luck. I even cannot open well other activities - after some pause - the killing, and Main activity is restarted. App is used MapView (OSR) lib on the Main. The service woring with a server updates the SQLite db and call Code: If IsPaused(Main) = False Then CallSubDelayed(Main, "Activity_Resume") End If Where markers of the map are being updated.
Erel B4X founder Staff member Licensed User Longtime User Apr 16, 2014 #8 Note that the code you posted will cause Activity_Resume to run twice. You should use StartActivity if you just want to show the activity. If you can reproduce the issue in a small project then please upload it. Upvote 0
Note that the code you posted will cause Activity_Resume to run twice. You should use StartActivity if you just want to show the activity. If you can reproduce the issue in a small project then please upload it.
peacemaker Expert Licensed User Longtime User Apr 16, 2014 #9 Why twice ? I just need to re-draw the Activity (by Activity_Resume) from a service when it's on the display. Not twice :-( Upvote 0
Why twice ? I just need to re-draw the Activity (by Activity_Resume) from a service when it's on the display. Not twice :-(
Erel B4X founder Staff member Licensed User Longtime User Apr 16, 2014 #10 CallSubDelayed will first start the activity and then call the target sub. Upvote 0
peacemaker Expert Licensed User Longtime User Apr 16, 2014 #11 So, correct will be Code: If IsPaused(Main) = False Then CallSub(Main, "Activity_Resume") End If Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Apr 16, 2014 #12 My mistake. I didn't read the condition correctly. If the activity is not paused then it will only execute once. Both CallSub and CallSubDelayed will work here. Upvote 0
My mistake. I didn't read the condition correctly. If the activity is not paused then it will only execute once. Both CallSub and CallSubDelayed will work here.
L Luiz Fernando Orlandini Active Member Licensed User Longtime User Jun 10, 2014 #13 Hey dude, I got the same behaviour that you described. Have you fixed? Thanks Upvote 0
L Luiz Fernando Orlandini Active Member Licensed User Longtime User Jun 12, 2014 #14 Erel, can you help me? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 12, 2014 #15 Please start a new thread and explain the problem you encounter. This message is not an error message. Upvote 0
Please start a new thread and explain the problem you encounter. This message is not an error message.