Im working with my SMS application and now have a service running that wakes up the activity when new messages arrive from one user. It works, opens the main activity and show the message in a label.
Now i try the next step..cleaning the message from technical information and separating each word in different rows to be able to count words to get an streetadress from the textmessage.
I have tried Regex and Match, but cant get it to work..
I get [Ljava.lang.String;@40585cb8
I probably miss many steps...but i try to take one step at a time and now stuck at this :BangHead:
Here is the Activity:
I have also tried Erel's example but get the same error..
Now i try the next step..cleaning the message from technical information and separating each word in different rows to be able to count words to get an streetadress from the textmessage.
I have tried Regex and Match, but cant get it to work..
I get [Ljava.lang.String;@40585cb8
I probably miss many steps...but i try to take one step at a time and now stuck at this :BangHead:
Here is the Activity:
B4X:
Sub RefreshData
Dim SmsMessages1 As SmsMessages
Dim List1 As List
List1 = SmsMessages1.GetAllSince(DateTime.Add(DateTime.Now , 0, 0, -5))
For i = 0 To List1.Size - 1
Dim Sms As Sms
Sms = List1.Get(i)
If Sms.Address = "+41234567" Then
Log(Sms)
End If
Next
Dim text As String
text= (List1)
Dim tempstr() As String
tempstr = Regex.Split("(\b[^\s]+\b)", List1)
Log(tempstr)
lblPos.text = (tempstr)
I have also tried Erel's example but get the same error..
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim text As String
text= "Please send issues to [email][email protected][/email], putting them in the reviews doesn't help me find/fix them".touppercase
Dim tempstr() As String
tempstr = Regex.Split("\s", text)
End Sub
Last edited: