Android Question GET VALUE

Herbert Souza

Member
Licensed User
Longtime User
Friends, I need some help here, I'm new in basic 4 android, it seems to be simple but I can not solve, I have a processing, and print it on a map, but I need to save that too in a text file. This processing returns 5 keys, I need to save only 1 key in a txt file, how would I do?

My current code is this:

B4X:
Sub myOCR_ExtractedText_Response(OCRdata As Map)

ProgressDialogHide
For I = 0 To (OCRdata.Size - 1) / 5
                Msgbox(OCRdata.Get("Text_" & I), "Resultados Obtidos")
            File.Writemap(File.DirRootExternal, "Herbert.txt", OCRdata)       
Next
End Sub

As I said it returns 5 values (keys), in this case it is printing the TEXT_0 value in the map, I want to save only this in my .txt file

Attached I leave my txt file as it is being printed now.
 

Attachments

  • file txt.txt
    224 bytes · Views: 123

Cableguy

Expert
Licensed User
Longtime User
Ola Herbert, na linha onde escreves o file coloca uma condicao para que so escreva o "TEXT_0", algo como:

If I=0 Then File.Writemap(File.DirRootExternal, "Herbert.txt",OCRdata.Get("Text_" & I))
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…