Android Question Ocr library or extRecognition compatible with sdk version 29

SMOOTSARA

Active Member
Licensed User
Longtime User
Hello dear friends ?

I need an Ocr or TextRecognition library for B4A.

This library must be compatible with the new version b4a and sdk 29.

Do you know an example?

Thank you for your guidance
 

SMOOTSARA

Active Member
Licensed User
Longtime User
Are you sure this Library and Example won't work for you?

Hi MikeSW17

This is a good library, but I get the following error when go to in another activity

 
Upvote 0

MikeSW17

Active Member
Licensed User
Longtime User
Hi MikeSW17

This is a good library, but I get the following error when go to in another activity


What Error? Not that this Newbie is likely to fix it, but someone else might.
 
Upvote 0

SMOOTSARA

Active Member
Licensed User
Longtime User
Hi MikeSW17


I will send you the following version


In this version you after going to OCR_Activity

If you only [ 1 click ] the [Start OCR] button and hit the back button for exit activity
Everything is fine and you are back to the previous activity. ;) :)

But

If you click the [Start OCR] [2 or more times ] and then try to return to the previous activity, you will encounter the following error.

B4X:
** Activity (ocr_activity) Create, isFirst = false **
** Activity (ocr_activity) Resume **
** Activity (ocr_activity) Pause, UserClosed = true **
** Activity (main) Resume **
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.camerasource.CameraSource.stop()' on a null object reference
    at textrecognitionwrapper.textrecognitionWrapper$1.surfaceDestroyed(textrecognitionWrapper.java:236)
    at android.view.SurfaceView.updateWindow(SurfaceView.java:588)
    at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:247)
    at android.view.View.dispatchWindowVisibilityChanged(View.java:10514)
    at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1290)
    at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1290)
    at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1290)
    at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1290)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1551)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1261)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6345)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
    at android.view.Choreographer.doCallbacks(Choreographer.java:686)
    at android.view.Choreographer.doFrame(Choreographer.java:621)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6138)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **

This issue became clear after updating my program and crashing high in the program statistics?
Let me know if you solve the problem
Thanks
 

Attachments

  • b4aAndroidTextRecognition.zip
    11.4 KB · Views: 219
Upvote 0
Top