Oh, Thanks Peach. 
Upon looking at the code I noticed that this what I am using already. My main problem is that whenever I download the json file with my simulator it can download it but if i build to my tab(android) it freezes.
What it does first is download the json file the decodes it then deletes the devices database and loads the new one with the information from the json file. It seems to reach the deleting part but it just freezes. What is wrong?
[lua]local response = http.request(“http://…”)
if response == nil then
print (“NO DATA FOUND”)
else
local path = system.pathForFile( jsondata, system.DocumentsDirectory )
local myFile = io.open( path, “w+b” )
– Request remote file and save data to local file
http.request{
url = “http://…”,
sink = ltn12.sink.file(myFile)
}
cleanDB() fillUpDB() reloadFreeplay() native.setActivityIndicator(false)
end[/lua]
I hope you understand what i’m trying to say and I hope you have something to say to fix this problem. [import]uid: 141531 topic_id: 27057 reply_id: 110069[/import]