Hello everyone, i'm currently saving an xml file like this
i have 4 different activities and each one saves a different xml file, i then parse the file to extract the necessary data from the files, my question is if i close the app and then re-launch it again i would expect new and refreshed data to get saved in those xml files since i'm pulling those files from an online API, for some reason when i access a schedule which gets updated every second i always receive the same data i got when i first launched the app for the first time, is there a way to delete those xml files everytime so that when you re-launch the app new ones will get created?
man, i think i just made myself dizzy trying to explain this, ;(
anyhow any help will be greatly appreciated.
cheers,
Walter
B4X:
Sub hc3_ResponseSuccess(Response As HttpResponse, TaskId As Int)
Response.GetAsynchronously("GetRSS3", File.OpenOutput(File.DirDefaultExternal, "RSS3.xml", False), True, TaskId)
End Sub
Sub hc3_ResponseError(Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
If Response <> Null Then
Msgbox("Error: " & Response.GetString("UTF8"), "Connection Error")
Response.Release
End If
End Sub
Sub GetRSS3_StreamFinish(Success As Boolean, TaskId As Int)
If Success = False Then
Msgbox(LastException.Message, "Error")
Return
End If
Dim in As InputStream
in = File.OpenInput(File.DirDefaultExternal, "RSS3.xml")
Parser3.Parse(in, "Parser3")
in.Close
Activity.Title = "Bus Schedules: "
ProgressDialogHide
End Sub
i have 4 different activities and each one saves a different xml file, i then parse the file to extract the necessary data from the files, my question is if i close the app and then re-launch it again i would expect new and refreshed data to get saved in those xml files since i'm pulling those files from an online API, for some reason when i access a schedule which gets updated every second i always receive the same data i got when i first launched the app for the first time, is there a way to delete those xml files everytime so that when you re-launch the app new ones will get created?
man, i think i just made myself dizzy trying to explain this, ;(
anyhow any help will be greatly appreciated.
cheers,
Walter
Last edited: