yo3ggx Active Member Licensed User Longtime User Jan 30, 2024 #1 Hello, I have an application that runs some code in a service (to allow running in the background). When the application crashes, Android shows it as open. I try to use in Starter service B4X: Copy Sub Application_Error (Error As Exception, StackTrace As String) As Boolean ExitApplication Return False End Sub The app still remains open in the background. If I keep only Return False, the app does no more close, but this is not what I want. What can I do to just close everything? Thanks. Last edited: Jan 30, 2024
Hello, I have an application that runs some code in a service (to allow running in the background). When the application crashes, Android shows it as open. I try to use in Starter service B4X: Copy Sub Application_Error (Error As Exception, StackTrace As String) As Boolean ExitApplication Return False End Sub The app still remains open in the background. If I keep only Return False, the app does no more close, but this is not what I want. What can I do to just close everything? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Jan 30, 2024 #2 When an app crashes the process is killed. You don't need to do anything to "close everything". If you have a foreground service then the OS can try to restart the process and the service. Check the logs and see whether it happens. Best to fix the app so it doesn't crash. Upvote 0
When an app crashes the process is killed. You don't need to do anything to "close everything". If you have a foreground service then the OS can try to restart the process and the service. Check the logs and see whether it happens. Best to fix the app so it doesn't crash.