1

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 include abc.pdf in it.All I wanted to do is add pdf inside an app and produce the app such that when I install the app on my phone , the app should contain the abc.pdf and it can be accessed by a button.

2 Answers2

0

I think what you are after is the asset folder and putting your file in there and then reading it. An asset is anything an android app may use which is not part of the app-structure itself such as ui components, ui image resources or code.

You need to read your pdf from the assets and then you can make the android system show it by using an appropriate app.

Check out this question:

Read a pdf file from assets folder

Community
  • 1
  • 1
Adam
  • 2,845
  • 2
  • 32
  • 46
-1

if those pdf files are static and you have fixed number of pdf files you can add them to the assets but if those pdf files are changing then you need to have a web service in which you have to store those pdf files so that they will be shared to all users

Badr
  • 294
  • 1
  • 3
  • 14
  • yes those pdf remain the same they don't change.so can u please tell how to access them in my app.and the pdf files shuld be within the app.I mean to say when I install the app on my other device the app shall contain the pdf. – Ranjith Kumar May 04 '17 at 15:51
  • i think this answer will be helpful to you http://stackoverflow.com/questions/17085574/read-a-pdf-file-from-assets-folder?noredirect=1&lq=1 – Badr May 05 '17 at 14:22