Android Question how to completely end application

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
hello

is there a way to completely stop app execution ?
all options i tried including this code

B4X:
Dim jo As JavaObject
    jo.InitializeContext
    jo.RunMethod("finishAffinity", Null)
    Activity.Finish

doesn't really stop the app
i want something that will permanently end the app's ececution

thanks
 

udg

Expert
Licensed User
Longtime User
From an old post by @Erel :
"The OS will treat your app as if it has crashed when you call ExitApplication. In some cases it will try to restart it automatically."
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
i think i did
but udg says that the os will treat my app as crashed if i use exitapplication
so i asked if there is another way to do that ?

on another topic if i may
i download a text file - now i do that with okhttputils2 - file is downloaded filne
but how do i save it as a text file ?
here is my code

the url is of course set prior using it

B4X:
j.Initialize("", Me)
    j.Download("prmFileURL")
   
    Wait For (j) JobDone(j As HttpJob)
   
    If j.Success Then
       'here i need to save it as a simple text file
    Else
    End If
   
    j.Release
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
oh my god how silly i am...
these new functions are so much more simple
got it all working...
sorry for pesting you guys...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…