trepdas Active Member Licensed User Longtime User Feb 18, 2021 #1 Hello good people, in our project, I call to decode a bitmap with google android vision ocr. I need to wait for it to finish before I can continue. B4X: Copy mvbm.Initialize("mvbm") mvbm.decodeBitmap(Bm) when it completes it brings out results with this sub : B4X: Copy Sub mvbm_lines_result(lines As String) Log("B4A Lines = " & lines) End Sub I have tried several options all resulted with error :/ i.e. wait for (mvbm.decodeBitmap(Bm)) complete (Bm1 As Bitmap) how to make it work ? ?
Hello good people, in our project, I call to decode a bitmap with google android vision ocr. I need to wait for it to finish before I can continue. B4X: Copy mvbm.Initialize("mvbm") mvbm.decodeBitmap(Bm) when it completes it brings out results with this sub : B4X: Copy Sub mvbm_lines_result(lines As String) Log("B4A Lines = " & lines) End Sub I have tried several options all resulted with error :/ i.e. wait for (mvbm.decodeBitmap(Bm)) complete (Bm1 As Bitmap) how to make it work ? ?
Erel B4X founder Staff member Licensed User Longtime User Feb 18, 2021 #2 You are catching a regular event here: Code: Copy mvbm.Initialize("mvbm") mvbm.decodeBitmap(Bm) Wait For mvbm_lines_result(lines As String) The "complete" event is relevant for subs that return ResumableSub: [B4X] Resumable subs that return values (ResumableSub) Upvote 0
You are catching a regular event here: Code: Copy mvbm.Initialize("mvbm") mvbm.decodeBitmap(Bm) Wait For mvbm_lines_result(lines As String) The "complete" event is relevant for subs that return ResumableSub: [B4X] Resumable subs that return values (ResumableSub)