MRZ camera reader
prathanbomb / android-mrz-reader Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
On portrait mode camera view not working properly.
The app Crash when I click on the Scan Button API 19 Any fix ?
First of :
For androidx replace Imageview
in with AppCompatImageView
in ShutterButton activity.
Next : There is a Render Problem in capture layout
The build is success but this error this still remain somehow I think it's related to the Flash camera
This seem to be the reason of this
`
<mrz.reader.ViewfinderView
android:id="@+id/viewfinder_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#0000"/>
`
Logcast
java.lang.NullPointerException
at mrz.reader.ViewfinderView.onDraw_Original(ViewfinderView.java:110)
at mrz.reader.ViewfinderView.onDraw(ViewfinderView.java)
at android.view.View.draw_Original(View.java:20207)
at android.view.View_Delegate.draw(View_Delegate.java:56)
at android.view.View.draw(View.java:20177)
at android.view.View.draw_Original(View.java:20077)
at android.view.View_Delegate.draw(View_Delegate.java:68)
at android.view.View.draw(View.java:19849)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4333)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:65)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.draw_Original(View.java:20075)
at android.view.View_Delegate.draw(View_Delegate.java:68)
at android.view.View.draw(View.java:19849)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4333)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:65)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.draw_Original(View.java:20075)
at android.view.View_Delegate.draw(View_Delegate.java:68)
at android.view.View.draw(View.java:19849)
at android.view.ViewGroup.drawChild_Original(ViewGroup.java:4333)
at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:65)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.draw_Original(View.java:20210)
at android.view.View_Delegate.draw(View_Delegate.java:56)
at android.view.View.draw(View.java:20177)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:399)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:551)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:420)
at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:120)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:151)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:133)
at com.android.tools.idea.rendering.RenderTask.lambda$null$8(RenderTask.java:783)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
And Last : If you Click on the Flash Button the App crash after some research it turn out in CaptureActivity
iconFliash.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(getApplicationContext(), R.color.color_flash_off))); flashBt.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(isFlash){ flashBt.setBackground(ContextCompat.getDrawable(CaptureActivity.this, R.drawable.toggle_flash_click)); iconFliash.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(getApplicationContext(), R.color.color_flash_off))); cameraManager.turnFlashlightOn(); isFlash =false; }else{ cameraManager.turnFlashlightOff(); flashBt.setBackground(ContextCompat.getDrawable(CaptureActivity.this, R.drawable.toggle_flash)); iconFliash.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(getApplicationContext(), R.color.color_flash_on))); isFlash =true; } } });
Workaround : Comment theses line but you won't be able to turn off the Flash Camera
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.