I know how to save a file when exit normally , like click keycode_back.
using code as
but when exit the program from the recent apps list,file not saved.
so, how can save a file in this case? Thanks
using code as
B4X:
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then
Log("MAIN close")
File.WriteString(File.DirInternal,"state.txt",i_btn)
End If
End Sub
but when exit the program from the recent apps list,file not saved.
B4X:
Sub Service_TaskRemoved
'This event will be raised when the user removes the app from the recent apps list.
Log("recent remove")
File.WriteString(File.DirInternal,"state.txt",Main.i_btn)
End Sub
so, how can save a file in this case? Thanks