I am trying to figure out how to use the miscUtil library to add "X" number of contacts, each with a randomly generated name and randomly generated phone number. The X value would be populated with a number entered into a EditText view and a button would activate the actual contact creation sequence.
The code example he uses is this:
How could I set this code into a loop to run X number of times and randomly generate the name="" and phoneNr="" fields?
Thanks for the help. I am new here, thanks for helping me get up to speed.
The code example he uses is this:
B4X:
Sub Button1_Click
Dim mu As miscUtil, c As Contact
mu.Initialize
Dim name As String, phoneNr As String, phoneType As Int, mail As String, mailType As Int
name = "Mike Tester"
phoneNr = "004912345678"
phoneType = c.PHONE_HOME
mail = "[email protected]"
mailType = c.EMAIL_HOME
mu.createContactEntry(name, phoneNr, phoneType, mail, mailType)
End Sub
How could I set this code into a loop to run X number of times and randomly generate the name="" and phoneNr="" fields?
Thanks for the help. I am new here, thanks for helping me get up to speed.