Hi I have a file that has been turned into a list. The list looks like this:
"[Username=someuser , Password=somepass , lostmode=off , Latitude= , Longitude= , TTS= , Vibrate= , Alarm= , Call= , SMSNumber= , SMSMessage= , POPMessage= , Camera= , Record= , Shutdown= , Restart= , Lockout=off , Screen= , Date= , Wipe= , LockPasscode= ]"
How can I format "FD = Regex.Split(", =", User)" to split on every comma and equal sign?
What I want it to do is just show the username and thats it. "someuser"
Every reply is appriciated!
What I have:
This code just displays: "someuser, Password"
"[Username=someuser , Password=somepass , lostmode=off , Latitude= , Longitude= , TTS= , Vibrate= , Alarm= , Call= , SMSNumber= , SMSMessage= , POPMessage= , Camera= , Record= , Shutdown= , Restart= , Lockout=off , Screen= , Date= , Wipe= , LockPasscode= ]"
How can I format "FD = Regex.Split(", =", User)" to split on every comma and equal sign?
What I want it to do is just show the username and thats it. "someuser"
Every reply is appriciated!
What I have:
This code just displays: "someuser, Password"
B4X:
Sub Service_Start (StartingIntent As Intent)
If ListData1.IsInitialized Then
ListData1.Add(File.ReadList(File.DirInternal, "userdata.txt"))
User = ListData1.Get(0)
FD = Regex.Split("[,\s]+", User)
FD = Regex.Split("=", User)
ListData2.Initialize2(FD)
Log(ListData2)
ToastMessageShow(ListData2.Get(1), True)
CheckLostMode
Else
ListData1.Initialize
ListData1.Add(File.ReadList(File.DirInternal, "userdata.txt"))
User = ListData1.Get(0)
FD = Regex.Split("[,\s]+", User)
FD = Regex.Split("=", User)
ListData2.Initialize2(FD)
Log(ListData2)
ToastMessageShow(ListData2.Get(1), True)
CheckLostMode
End If
End Sub