I’m pulling my hair out on this one…
I am writing a local file something.html after parsing an xml file. I save it in the system.DocumentsDirectory.
I can verify the file exists… but when I send it to the webpopup I get some weird directory that doesnt exist (like above) /data/data/packagename/app_data/MYURL
[lua] --This is the mock of the name that I get back from data added here for some clarity
local msgfile = “something.html”
– simple call back
local function listener( event )
native.showAlert(“title”, event.url)
end
– lets verify that the file exists on drive in the space we think it is
local path = system.pathForFile( msgfile, system.DocumentsDirectory )
local file = io.open( path, “r” )
if file then
– yep found the file adding the alert just here
native.showAlert(“epic”, path)
local options = { hasBackground=false, baseUrl=system.DocumentsDirectory, urlRequest=listener }
– I also tried sub path in the msgfile and removed the options… no diff
native.showWebPopup(50, 50, display.contentWidth, display.contentHeight-20, msgfile, options)
else
– failed to find the file in the system.DocumentDirectory (I never get here)
native.showAlert(“epic”, “fail”)
end[/lua]
arg… please help a stranded travler. [import]uid: 37036 topic_id: 9241 reply_id: 309241[/import]