Android Question Killing previous instance (main)

peacemaker

Expert
Licensed User
Longtime User
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.
 

peacemaker

Expert
Licensed User
Longtime User
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
Can it be due to CallSub or CallSubDelayed ?
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I have added checking
if IsPaused (Main) = false then Call.......
and, seems, no killing now.... need to check longer.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
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

B4X:
    If IsPaused(Main) = False Then
        CallSubDelayed(Main, "Activity_Resume")
    End If

Where markers of the map are being updated.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
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

peacemaker

Expert
Licensed User
Longtime User
So, correct will be
B4X:
    If IsPaused(Main) = False Then
        CallSub(Main, "Activity_Resume")
    End If
 
Upvote 0
Top