#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.
Dim TTSResult As TTS
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.
Dim ResultMessage As String
Dim WebView1 As WebView
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("OCRResult")
TTSResult.Initialize("TTSResult")
TTSResult.SpeechRate=0.9
ResultMessage=""
End Sub
Sub Activity_Resume
If TTSResult.IsInitialized = False Then
TTSResult.Initialize("TTSResult")
TTSResult.SpeechRate=0.9
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
TTSResult.Release
ResultMessage=""
End Sub
Sub TTSResult_Ready (Success As Boolean)
If Success Then
TTSResult.Speak("Rezultatul pentru recunoașterea optică a caracterelor este: " & ResultMessage, True)
Else
Msgbox("Eroare de inițializare TTS.", "")
End If
End Sub
Public Sub ShowText(Text As String)
WebView1.LoadHtml(Text)
ResultMessage=Text
End Sub