how to retrieve a pdf through android app - android

I am new to android. I am creating a mobile app in android studio which contains a lot of PDF file views for the users using app. I decided to store those PDF files in a server. But i don't know to how retrieve the files on my the app.Is there any way to retrieve the PDF on our app from the local server..
Hoping for reply..

Just store the pdf files on your server using Multipart Post multipart request with Android SDK and then retrieve those files and store them in phone. Then you can use a filemanager https://github.com/nexes/Android-File-Manager to select and open the file.
For opening pdf you have to fire the intent which will open pdf file by using a preinstalled app or if you want to open by your app then there are several libraries like muPDF library, iText library(Java Library).

Related

I want to download pdf from my website into my app and that pdf only show in my app only

I want to download pdf from my website into my app and that pdf only show in my app only , no other app can access it. What type of logic i need to implement in my Android Code ?
Download your pdf file into internal storage in android phone.According to the android developer site, by default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user).
Check https://developer.android.com/training/data-storage/files for reference.

How do I download PDF from Firebase in Android app which get open only in that particular app?

I am creating an android app which delivers PDF file for this i am using Firebase ,how should i download that PDF file and only get show in my app PLEASE help me to do this.

Make app generated content show in stock android Downloads app

We are working on an android app that generates PDFs based on app contents on users' request. We are providing an option to launch an email agent and attach the generate PDF, but we also want the user be able to view the document later at any time. On android, there are no stock file explorer, so our first thought was to show on the stock Downloads app's file list. We've tried the following two methods but without luck.
We firstly tried to save the PDF to the default download folder (given by calling Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS)) and invoke media scanner, but the file doesn't show up in the Downloads app's list. It's shown in Adobe Acrobat's local document list though.
After some research, it seems that the Downloads app would only show files that downloaded though DownloadManager, so we tried to generate the PDF in a temporary directory and call DownloadManager to download it, but, somehow expected, it complains that we can only download via HTTP(S), so this approach isn't working as well.
Is there any other solution?
well if you have to provide access to the document without any file explorer app, i think your approach is correct it to allow to store it in the Download lists. To achive this you can use Nanohttpd in your application to host your pdf document and then invoke the DownloadManager download action using HTTP(S) to your webapp (you will have to create a small webapp to handle the download request) hosted on localhost server.

Displaying PDF in my Android app

I am developing an Android app and currently I am downloading a PDF file which I got from external web service. Now I want to display the PDF inside the application using PDF viewer without saving to the device memory.
Is it possible? If it isn't, then is it possible to save a PDF file to the device with password protected?

Need to develop PhoneGap app which will show a different PDF every week

I am developing a PhoneGap app which will show a PDF of a newsletter. I am linking to the externally hosted PDF from the app. The PDF will change every week. Obviously it is not practical to ask people to update the app every week, so I am looking for suggestions on how to go about this?
I had trouble getting PDF to display on android, but solved this by uploading the PDF to google drive and linking to the PDF on google drive. The fact that I need to use google drive eliminates the option of using a static link and uploading the latest PDF to the same destination (and with the same name obv) every week.
You can make a PHP or ASP service on server which will give a XML or json response.
There you can update the new PDF link.
Make an call to those php or ASP service from your app, get the new pdf link (e.g. you can use jquery ajax call for this)

Categories

Resources