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

Implementation with webview : display Tiff only, just open #59

Open
gnutwist opened this issue Sep 7, 2023 · 0 comments
Open

Implementation with webview : display Tiff only, just open #59

gnutwist opened this issue Sep 7, 2023 · 0 comments

Comments

@gnutwist
Copy link

gnutwist commented Sep 7, 2023

Hi Aleksey, I'm sorry... I'm having difficulty, due to my lack of understanding of how to implement the Android-TiffBitmapFactory with webview.

I reviewed all the previous issues here on github, and reviewed everything I could find in Stack Overflow, but I still haven't figured out how to display a Tiff from within a webview.

To answer a couple questions I noticed you asked a few times:
I do not use proguard; targetSdk 33

I added this to build.gradle(app)
implementation 'io.github.beyka:Android-TiffBitmapFactory:0.9.9.1'

I added this to the MainActivity.java (I'm not sure if it should be on the WebviewFragment.java page instead)
import org.beyka.tiffbitmapfactory.TiffBitmapFactory;

I'm not sure if a setOnClickListener would be needed, or how... for when a Tiff is selected from a dropdown on the webpage?
The jpg's display normally from a dropdown that has jpg's and tif's but the tif's display blank.

According to a post from CommonsWare near the bottom of this page, only Step 1 is needed to display a Tiff:
https://stackoverflow.com/questions/74562724/convert-tif-to-png-image-android-studio-using-https-github-com-beyka-android

He says:
What you have listed as 2, 3, and 4 are not needed, unless you are forking the library and building it from source ("Build from sources"). If you simply want to use the library, you only need step 1.

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

1 participant