How to open Last Viewed PDF from my App using PDFView in Android? - android

I made an Android app that has a lot of pdf serially in a listview. Now I want to give a feature to the user that the user can view his/her last viewed PDF with a Floating Action Button. This FAB will open the PDF that was opened/studied at last by the user. But how can I do that? Thanks in Advance. Any help Appreciated.

you can save the source to the shared preferences so that every time a new pdf is opened its source is to be saved in the shared preferences............
I hope this helps

Related

Show overlay button after copying into clipboard

recently google translate android app has added a feature that as soon as you copy a text into clipboard, a button appears on screen to translate it.
Does it using kind of service or what?
What's this feature's name or what show I search ?
Is there any samples for this feature?
I have attached two pictures to clarify my question.

AppGyver: PDF behind navigation bar

I'm trying to view a PDF in my AppGyver app, but there are some problems with it. First of all, some notes:
The PDF can be accessed through a url to a php page which will generate the requested PDF file.
POST data must be sent when trying to access the url / PDF file (login credentials).
The PDF file is on an external web server.
The user must be able to go back to the last view.
I read about using steroids.views.PreviewFileView to view PDF files. Unfortunately it looks like this class is only supported on iOS and I would like to support Android too. The pdf can be accessed by clicking on a certain button.
I made this workaround, which creates a form by JavaScript and submits it immediately, when clicking on the button. Therefore I can request a file while sending post data and display it in the app. But when the PDF is loaded, the top part is displayed behind the navigation bar. When pinch-zooming the screen, the PDF file will be on screen entirely.
If I should use steroids.views.PreviewFileView, how can I send POST data to the url while trying to access the file? Or should I continue the way I solved it? Cause then I would like a little help with the solution on displaying the first page of the PDF entirely on loading it.
The steroids.views.PreviewFileView is not supported in the AppGyver Legacy Android Scanner, and seeing as that runtime is no longer in active development, will not be in the future either.
Viewing pdf's in Android WebViews in general is not exactly straightforward, but a common workaround seems to be to route it through Google Docs, as described in this answer. You should be able to adapt that for your use case as well (use it as the location attribute for a new WebView).
If you open the pdf in a new WebView, the user should be able to navigate back using the physical back button, so you could even just hide the navigation bar, if that is the only bothering you about the current workaround.

how to initiate printing through android?

I'm displaying a PDF using webview in android, i.e appending my PDF link to https://docs.google.com/gview?embedded=true&url=. PDF is being displayed on click of button, my requirement is that when that button is clicked, the PDF which is being rendered on webview, should be able to print. Initiation of printer should be through WiFi preferably.
I'm kind of struck. Are there any apps which I can initiate through my app? Any help is highly appreciated.
How about trying Google Cloud Print
http://www.google.com/cloudprint/learn/

android: displaying radio buttons when starting application

I have an application in android that shows a list of videos.. However, the list can be stored either in internal storage or in external storage. What I want is that when the application starts, I want two radio buttons and a save button. The radio buttons should ask the user about whether they want to select internal storage or external storage.. And the save button should save the settings. Can anyone tell me how this can be achieved?
Thanks alot
I would highly suggest using SharedPreferences for anything along the lines of user-controlled settings or configurations you would like to save.
What I would do is have an opening activity (that could be made to look like a dialog if you so choose) that presents the option to the user and then passes that option to the next activity that actually runs the program.

How to create book app for android?

I want to build a simple book app for android that contains 100 pages of text-only content using android studio.
First activity to enter , 2 buttons for navigating to next and previous page and page number indicator. Also when page indicator clicked, a window pops up for entering specific page number.
Which way is better for this purpose ? Database or HTML method ?
Is there any source code or tutorial resources ?
I have done this using HTML method. What I did is I created HTML files for all the pages, then zipped all the pages.
After that unzipped it into android file system then using WebView I am able to view all the pages like a book app does.
I have added next page, previous page, and search button also.

Resources