I am working on an EMS app for our hospital on ANDROID and I am displaying a list of files and then allowing the user to choose one and it displays an html file with the neccessary protocol, drug information, etc.
I currently have it displaying a webpage in a webview that takes up part of the screen - when they hit the back button, I have it removing the webview - otherwise it sticks around.
So far, so good.
BUT… when I try to display a local file, it can’t find the local file.
I’ve copied all of the files to a directory called HTML and copied that into my corona directory and added that to my project.
So, in my directory, it looks like this:
C:\CoronaProjects\ProjectDirectory\HTML
Under HTML, is a directory called Drugs, under which is a file called Aspirin.html
I am using the following code:
local doc = "HTML/Drugs/Aspirin.html" webView = native.newWebView( 0, SBH, \_W, \_H-SBH ) webView.anchorX = 0 webView.anchorY = 0 webView:request( doc, system.ResourceDirectory )
So, to me, it looks like it should be looking for HTML\Drugs\Aspirin.html in the resource directory (where main.lua is located). According to that, it SHOULD exist.
Is there some reason why this won’t work? I can’t troubleshoot it in the simulator since webview doesn’t work there.
Any ideas?