This is an attempt to take care of your request - not that simple.
You will need to download some library files from here and copy them to your additional library folder:
https://www.dropbox.com/s/h030xduz0iws6gx/LibFilesForOCR.zip?dl=0
Attached the sample B4A project and the B4A library files.
Extract resource.zip and copy it to be on the same folder lever as that of the /Files and /Objects folders of the B4A project.
Take note of the B4A Manifest Files.
It uses the native camera to take a picture of the text and then passes the captured bitmap to be decoded in order to extract the text in the bitmap.
I have created the B4A project with B4A V6.50
You need to have DesignSupport (at least V2.00) installed and enable in the libraries tab of the B4A project
Save the image after it has been captured by clicking on the Save button. The captured bitmap then will be used to extract the text and return it to the B4A project via an event that will be raised (see sample project)
Sample Code:
#Region Project Attributes
#ApplicationLabel: b4aOCR2
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: landscape
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\resource
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private Button1 As Button
Dim avocr As OCR_2
Private EditText1 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
avocr.Initialize("avocr")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
avocr.StartOCRReader
End Sub
Sub avocr_scan_failed(success As String)
Log("Scanned text = " & success)
EditText1.Text = " " & success
End Sub
Sub avocr_scanned_result(result As String)
Log("Here in scanned_result")
Log("Scanned text = " & result)
EditText1.Text = result
End Sub
View attachment 53706
View attachment 53709
View attachment 53708
View attachment 53707