K Kunhock Koo Member Licensed User Dec 10, 2019 #1 To exit and close my B4A application, I have tried all methods I can think of like exitApplication etc. But the app is always still there waiting pounce back. Can someone kindly advise .. greatly appreciated Thank You Kunhock
To exit and close my B4A application, I have tried all methods I can think of like exitApplication etc. But the app is always still there waiting pounce back. Can someone kindly advise .. greatly appreciated Thank You Kunhock
khwarizmi Active Member Licensed User Longtime User Dec 10, 2019 #2 As far as I know, exitApplication closes the application when applied from the only one active view, try to close every activity with acttivity.finish then you can apply exitApplication from the last one. Upvote 0
As far as I know, exitApplication closes the application when applied from the only one active view, try to close every activity with acttivity.finish then you can apply exitApplication from the last one.
kisoft Well-Known Member Licensed User Longtime User Dec 10, 2019 #3 Hello. do not use exitApplication, android will treat it as if the application has been suspended. Use activity.finish and let the system close the application. Do not fight it. Upvote 0
Hello. do not use exitApplication, android will treat it as if the application has been suspended. Use activity.finish and let the system close the application. Do not fight it.
LucaMs Expert Licensed User Longtime User Dec 10, 2019 #4 I write this just to make me tease To definitively close an app, I thought it was enough to close all the Activities and stop all the Services. Until, very recently, despite my "experience", that... it is not possible to stop the Starter service (I guess it's a protection set by Erel). Upvote 0
I write this just to make me tease To definitively close an app, I thought it was enough to close all the Activities and stop all the Services. Until, very recently, despite my "experience", that... it is not possible to stop the Starter service (I guess it's a protection set by Erel).
Star-Dust Expert Licensed User Longtime User Dec 10, 2019 #5 Try this Code: Copy Sub CloseActivities Dim jo As JavaObject jo.InitializeContext jo.RunMethod("finishAffinity", Null) End Sub Upvote 0
Try this Code: Copy Sub CloseActivities Dim jo As JavaObject jo.InitializeContext jo.RunMethod("finishAffinity", Null) End Sub
K Kunhock Koo Member Licensed User Dec 10, 2019 #6 Great Thanks ..I will definitely try it out .. Upvote 0
K Kunhock Koo Member Licensed User Dec 16, 2019 #7 Star-Dust said: Try this Code: Copy Sub CloseActivities Dim jo As JavaObject jo.InitializeContext jo.RunMethod("finishAffinity", Null) End Sub Click to expand... Hi , sorry to take this long to give it a try. Ya ... the app still stubbornly refused to die To any one, any other suggestion ? Regards. Upvote 0
Star-Dust said: Try this Code: Copy Sub CloseActivities Dim jo As JavaObject jo.InitializeContext jo.RunMethod("finishAffinity", Null) End Sub Click to expand... Hi , sorry to take this long to give it a try. Ya ... the app still stubbornly refused to die To any one, any other suggestion ? Regards.
Cableguy Expert Licensed User Longtime User Dec 16, 2019 #8 As far as I Know, the App only "dies" when the OS decides to "kill" it in order to free resources. All other "methods" only let the OS know that the app is no longer in active use. Upvote 0
As far as I Know, the App only "dies" when the OS decides to "kill" it in order to free resources. All other "methods" only let the OS know that the app is no longer in active use.
K Kunhock Koo Member Licensed User Dec 16, 2019 #9 Alright .. thanks for letting me know .. Regards. Upvote 0
Star-Dust Expert Licensed User Longtime User Dec 16, 2019 #10 The method that I suggested closes all the activities in case the app has opened more than one and prevents the operating system from restarting the app believing that it has been interrupted by mistake. But it always remains in the task manager except you set it to not appear entirely on the task manager Grom Manifest. See this thread https://www.b4x.com/android/forum/threads/closing-an-app.93221/#post-589867 Last edited: Dec 16, 2019 Upvote 0
The method that I suggested closes all the activities in case the app has opened more than one and prevents the operating system from restarting the app believing that it has been interrupted by mistake. But it always remains in the task manager except you set it to not appear entirely on the task manager Grom Manifest. See this thread https://www.b4x.com/android/forum/threads/closing-an-app.93221/#post-589867