i have a html embeds a swf file
i write this to load the html file by webview :
mywebview.loadUrl("file:///android_asset/myweb.html");
now i have a question , i wanna let the html embed a swf file , which also in the
eclipse project assets directory.
could anyone tell me what path should i set? file:///android_asset/myswf.swf??
You should use a relative path. If your HTML and SWF file resides in the same folder, use the SWF filename directly. (i.e. myswf.swf).
Related
My HTML file, index.html, and the picture 1603139547165.jpg are in the same file path or directory
I tried this in my HTML code <img src ="1603139547165.jpg" alt ="hello world">
Only a small unloaded image shows with HELLO WORLD next to it. Is there a special way to reference files that are stored on an Android phone? The image is in my Internal Storage.
Using Android, I have a WebView. I create html locally which includes references to css, javascript and images in the Assets folder. This local html is then displayed.
How do I get the WebView to reference the Assets' javascript and images?
I am guessing I need to tell the HTML VIew that the base folder is the Assets folder? If so, how?
You should acces the file index.html using this location:
file:///android_asset/index.html
I am trying to have an epub file link to an html document that is stored locally on my device.
I have an <a> tag with the href being:
"file://sdcard/mobi/content/file.html".
This does not work.
The epub file is currently located in the mobi directory as shown above, is there a way to relatively access the html file or is my href wrong?
I have tested the reader and it can open the file.html page if it is hosted on our local network.
Thank you in advance for any help
In my app i have
URL:: http://mymobilece.com/api/api_getexammaterials.php?id=27
Its a file how to show in webview? but not with Google document viewer.
webView.loadUrl("http://mymobilece.com/api/api_getexammaterials.php?id=27");
if it's a local file, then put it in your assets folder and do webView.loadUrl("file:///android_asset/myFile.html");
i have three different kind of files ,
Document file
text file
pdf file .
while clicking button i need to render those file in webview of android, is it possible or not.
If any one know the solution means help me out.
Note: i need load those files from asset folder.
Thanks.
is it possible or not.
You can display a text file in a WebView via the text/plain MIME type. WebView cannot render PDF. I have no idea what you think a "document file" is.