Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for directly viewing pdf files #352

Open
sanjitchak opened this issue Mar 24, 2018 · 10 comments
Open

Add option for directly viewing pdf files #352

sanjitchak opened this issue Mar 24, 2018 · 10 comments

Comments

@sanjitchak
Copy link
Contributor

sanjitchak commented Mar 24, 2018

Right now, Amahi Android app can open pdf files using external apps.

But since, pdf viewer can be integrated in-app,
we can add a feature of directly opening pdf files, to open important & private pdf in the app only.

Implementation:-
Using AndroidPdfViewer

@thegypsydev
Copy link

I'm new to Open Source, Can I contribute to this project? I have worked on AndroidPdfViewer earlier also.

@cpg
Copy link
Member

cpg commented Sep 10, 2018

Definitely, anyone can, it's Open Source!

The only concern is how much does something like this add to the binary. Any guesses?

If it's a substantial amount, it would be hard to justify, since I would imagine most people have PDF readers already in their phones.

@thegypsydev
Copy link

This increases the size of the apk by approximately 12 Mbs

@cpg
Copy link
Member

cpg commented Sep 13, 2018

Thanks for the estimate. That's about 15% increase in size, which is kind of noticeable. It makes is large that some Google apps.

I wonder about the features. I don't know enough about people using Android apps for PDF.

Any other opinions on this?

@sanjitchak
Copy link
Contributor Author

I raised this issue so that very sensitive pdf can be opened in the app only as old android phones are prone to hacks.
So, if most of our users, use the android app for fun and videos then I think that increase in size may not be justified. Most android phones come with pdf viewer preinstalled.

@codedentwickler
Copy link
Member

codedentwickler commented Sep 13, 2018

I think it's a good thing to have a way to open pdf in the app like @sanjitchak said for sensitive files. I don't see a need to add a library with a 12 MBs overhead to achieve this. What if a Web view is used to preview the document in the app, fancy features won't be available though. We can then allow the user to open with their favorite app from the Webview (maybe through the menu option). This implementation won't result to a tangible apk size increase.
We currently have this kind of implementation in the iOS app.

@cpg
Copy link
Member

cpg commented Sep 13, 2018

Good idea. The webview solution may work as a good compromise. I think any recent version of the webview probably can handle PDFs, it's built in, and if we can make it that the user can also open it with other apps, that would work well.

@sanjitchak
Copy link
Contributor Author

Yes, for opening with other apps, user may have the option of downloading the pdf. Maybe, a warning message if the user clicks on download.

@chirag-jn
Copy link
Member

Are we still planning to open the PDFs in an external viewer or can I start working on opening the PDF in a webview?

@shivamparashar165
Copy link

Love to work on this, I can do it.

Give me a chance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants