Android Question scan string in a list

JTKEK

Member
Licensed User
Longtime User
i use example from voice recognition

first button : to get voice and compare the string with the list
second button : to get voice and store in a list

i have problem when scan the list then compare the string

#update test.zip
 

Attachments

  • test.zip
    12.4 KB · Views: 294
Last edited:

DonManfred

Expert
Licensed User
Longtime User
My first thought:

B4X:
If s1=0 Then
  ReadListExample
Else If s1 = 0 Then
  WriteListExample
End If
WriteListExample will never be called
 
Upvote 0

JTKEK

Member
Licensed User
Longtime User
actually the writelistexample is called

the problem is when code below execute is will error

B4X:
       For i = 1 To 100
    If transfer = list1.Get(i) Then
    Label3.text = list1.Get(i)
    Label1.Text = "good"
    Exit
    End If
    Next

if i use code below it will works fine, but it only compare with 1 item

B4X:
        If transfer = list1.Get(0) Then
    Label3.text = list1.Get(0)
    Label1.Text = "good"
    End If

i want to compare with many item
 
Upvote 0

JTKEK

Member
Licensed User
Longtime User
ah... my mistake

i have repaired the code

but some word give a random error like picture below

Screenshot_2015-08-19-16-48-17.png
 
Upvote 0
Top