You’ll need to create a function in a Defold script to check the file as often as you want to.
local path = sys.get_save_file("html5_inbox", "data.file")
...
-- set content of a file on the filesystem
local html5_data = "some data"
function write_file(file, data)
local file = io.open(path, "w")
file:write(html5_data)
file:close()
end
...
-- get content of a file on the filesystem
local html5_data = read_file(path)
-- then do something if it's 1 or 0?
function read_file(file)
local f = io.open(path, "r")
local content = f:read("*all")
f:close()
return content
end
Take care for the details you will need to customize for whatever naming of the files etc. Full path needs to match in the HTML JS and in Defold. Read previous posts again for a reminder if you need help with that.
For the polling timer in Defold see these posts