Linked Questions
28 questions linked to/from Read a pdf file from assets folder
0 votes
1 answer
3k views
Trying to open PDF file from assets folder using fileProvider but it gives FileNotFoundException: No such file or directory [duplicate]
I am trying to display "NEFT.pdf" file stored in the asset folder of my android app. The following code works absolutely fine till API 25 private void CopyReadAssets(String filename) { ...
934 votes
24 answers
673k views
android.os.FileUriExposedException: file:///storage/emulated/0/test.txt exposed beyond app through Intent.getData()
The app is crashing when I'm trying to open a file. It works below Android Nougat, but on Android Nougat it crashes. It only crashes when I try to open a file from the SD card, not from the system ...
50 votes
3 answers
92k views
How to read pdf in my android application? [closed]
I am making an application which require to open pdf. I also have some pdf in asset folder so i am not able to open it in webview directly. By default android does not support pdf. Is there any API ...
25 votes
4 answers
108k views
How to open/display documents(.pdf, .doc) without external app?
I want to create a program, that open documents without external app. I need this, because i want to scroll the document with the phones orientation(Pitch and Roll). I create a button on the bottom of ...
8 votes
3 answers
14k views
How to create File object from assets folder?
I am trying to read a pdf file from my assets folder but I do not know how to get the path of pdf file. I right click on pdf file and select "copy Path" and paste it Here is the another screen shot ...
9 votes
1 answer
17k views
How to open PDF file in Android from the assets folder?
Does any one has an idea on how to open a PDF file in Android? My code looks this this: public class SampleActivity extends Activity { @Override protected void onCreate(Bundle ...
0 votes
2 answers
9k views
How to open a PDF file onclick of a button in Android?
I need to save PDF file when my app installs and then open it when a user clicks on a button. I found many solutions but was not able to integrate them into one.
0 votes
2 answers
9k views
open pdf file from asset folder in android
I placed a pdf file (bang.pdf) in assets folder, i need to open and display the pdf from assets folder when a button is clicked. The code is : package com.example.pdfviewer; import java.io.File; ...
0 votes
1 answer
10k views
Loading the pdf within the application on Android with PdfRenderer - how to locate the file?
I would like to use PdfRenderer to display the myDoc.pdf within the application: File file = new File("/sdcard/Download/myDoc.pdf"); PdfRenderer renderer = new PdfRenderer(ParcelFileDescriptor.open(...
1 vote
3 answers
1k views
Android - Read pdf and display it using Intent
I am developing an app in that I wanted to display a pdf file from asset. I did so much google and also tried number of permutations and combinations but not working. CODE: private void ...
4 votes
1 answer
4k views
How to open a local PDF in android? [duplicate]
I need to show a local pdf in my android app, this pdf needs to be included in my app package, I have this but I dont know how to build a File class. public void loadreglamento(View v){ //Im ...
0 votes
1 answer
5k views
Error:Execution failed for task ':app:mergeDebugAssets'
I'm trying to make an app in Android Studio that opens a PDF file saved in the assets folder of the app when I tap a button. It opens the PDF through a 3rd-party app via intents. I'm getting this ...
0 votes
1 answer
2k views
Error: This file could not be accessed Check the location or the network and try again in Android 6
I have to open pdf file stored in asset folder. When I am trying to open the file in Android 6, it shows error. But, no problem with other android versions. I think its the problem with permission. ...
1 vote
1 answer
2k views
Android development: How can i store pdf file in a android app as local file and read that pdf file? [closed]
I want to make a android mobile app which have a list view as a book list and when i tap on a list view cell it's open that book as a pdf. I need to store all pdf file in my app as local file, as a ...
1 vote
2 answers
3k views
Add pdf in android studio as in-built pdf in the app
I wanted to include some pdf in an app as a built-in pdf, like when I share that app on to other device and open the app, it should contain the pdf. Edit: Actually I want to make an app which should ...