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 feature to TextureView #10

Open
sanchan opened this issue May 18, 2016 · 6 comments
Open

Add feature to TextureView #10

sanchan opened this issue May 18, 2016 · 6 comments

Comments

@sanchan
Copy link

sanchan commented May 18, 2016

It would be great to add support for TextureView to be able to do this:

myTexture = (TextureView) findViewById(R.id.textureView);
myTexture.setSurfaceTextureListener(mSurfaceTextureListener);
// ...
QREader.getInstance().init(this, myTexture);

Why? Because for a better integration with the Camera2 API, it's recommended to use a TextureView, because:

Unlike SurfaceView, TextureView does not create a separate window but behaves as a regular View. This key difference allows a TextureView to be moved, transformed, animated, etc.

References:

https://developer.android.com/reference/android/hardware/camera2/package-summary.html
https://developer.android.com/reference/android/view/TextureView.html

Thanks for the good work!

@nisrulz
Copy link
Owner

nisrulz commented May 19, 2016

I will look into this in the weekend.

Thank you :)

@sanchan
Copy link
Author

sanchan commented May 19, 2016

Oh! Thanks to you! I was trying to do it by myself, and then send you a pull request but I'm completely junior with Android (I'm working on my second project), sorry :(

So, thanks sir! :)

@Shusshu
Copy link
Contributor

Shusshu commented Oct 18, 2016

+1

@matteotan
Copy link

Hi @nisrulz , any news in this topic?

Thanks a lot.

@nisrulz
Copy link
Owner

nisrulz commented Dec 12, 2016

Haven't worked on the TextureView Integration part as of yet, any PR would be welcome. Otherwise I would try to push it out in the next release.

@nisrulz
Copy link
Owner

nisrulz commented Dec 15, 2016

Since QREader uses (and simplifies) Google Vision API to read QR Codes, it made sense to use what they use i.e SurfaceView. However its technically possible to use Texture View as per this issue.

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

No branches or pull requests

4 participants