Open HTML file on Android [duplicate] - android

This question already has answers here:
Why can't chrome read local html file on android?
(1 answer)
How can I open and view html files stored locally on my Android device in a web browser running outside of my app, preferably using Intent ACTION_VIEW
(1 answer)
How to open HTML files on a SDCard on an Android
(4 answers)
Android - can not access the html file on sdCard [closed]
(7 answers)
Open a downloaded html file with WebView
(1 answer)
Closed 11 months ago.
There are some topics about this question but they are old and I can't believe there isn't a solution for this.
I have made an HTML file and placed it in the Download directory from Android.
When I try to open the file in Chrome, Firefox or Opera I get an error: file:///storage/emulated/0/Download/mysite.html
We are living in 2021 and I can't believe this isn't possible.
Maybe Tasker can help?

3 Options that can work, depending of the content of your file:
You can use a local web server in your Android phone itself. There are many server apps out there in the Play Store, one such app is Simple HTTP Server.
You can put your documents into the folder Android/data/com.android.chrome/files/Download/ in the internal storage. It's absolute path is /storage/emulated/0/Android/data/com.android.chrome/files/Download/ or /sdcard/Android/data/com.android.chrome/files/Download/. This is the location where Chrome stores any downloaded files and therefore, this is the only location where Chrome can access the files. But remember, uninstalling Chrome will delete this directory.
Also you can download a HTML Viewer to open your file.

Related

how to display pdf files on mobile by using MobileFirst

How can we display PDF Files on BB/iOS/Android and Windows phone by using MobileFirst (MobileFirst Studio) ? These PDF actually exists in DB as binary files.
Is there any API given by IBM?
MobileFirst does not (and should not) provide API to display a PDF file.
I am not sure this will possible in BlackBerry, but you can google for BlackBerry API or Cordova API to display it.
As for Windows Phone it seems that if you will provide a direct URL to the PDF file the default PDF reader should be able to display it, according to: Opening a PDF file in Windows Phone - so that means you can use the window.open JS API to open the URL to the PDF file.

How to read a PDF file in android application without Intent [duplicate]

This question already has answers here:
How to render a PDF file in Android
(11 answers)
Closed 7 years ago.
I am going to read a pdf file from my sdcard and load it into my android application without starting any pdf reader installed on my android device!
is it possible?
how?
thanks!
Or if you have access to internet, just upload it to Google Drive and view it online.
Just you need a Browser in this case.
The content of the .pdf can be read with read with the iText library for Android http://itextpdf.com/product/itextg But If you want see the content you need a pdf viewer app or integrate one in your app

Open a PDf file in android [duplicate]

This question already has an answer here:
Best way to include pdfs in an app
(1 answer)
Closed 9 years ago.
I am going to write an android app, which will contain a PDF file (included with in the application). My task is, when i click a button , pdf file should open . PDf file is placed in assets/raw (not sure where to place ).
Can any one help on this...
Thanks in advance
You can open pdf via webview and google docs.
You should use
WebView.loadUrl("http://docs.google.com/gview?embedded=true&url=www.site.com/file.pdf");
I would use a PDF Renderer to convert the file to a Bitmap. Otherwise, you would have to use another application to open the file, or the option that Walter gave you. Here is an example using a different library for rendering a PDF using Java.

How to read office documents in android [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
how to read / write doc and excel file in android?
I just need to read/view all microsoft office files such as word,powerpoint,excel documents in android.I've installed office document viewer in my device.I need any sample code to view those files.
Follow this link i think this is what you need How to render PDF in Android its for pdf i think you can do same for office docs
you can send via intent if app is already installed or display in webview with google docs links

How to open MS Office files in Android [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Android Microsoft Office Library (.doc, .docx, .xls, .ppt, etc.)
I have been searching for an API for android to open and view .doc, .ppt, .docx or .pptx.
I'm sure there should be one as there exist applications that can open these file format. I have found apache POI but it uses java awt which is not a part of android.
Even an API to convert these file format to .pdf will be useful.
There isn't a standard API for opening office files in Android. The applications you've found use an internal API for reading the files. They either do this in the device or they upload the file to a server, which is responsible for parsing the file and convert it to a format that is easier read from the Android client.
You can only do so if your phone comes with an application such as Quickoffice, and in those cases, you will be opening it in that application through your application.
How to render PDF in Android
Android Microsoft Office Library (.doc, .docx, .xls, .ppt, etc.)

Categories

Resources