heldenssjoerd
Member
We're using the code below, based on the thread:
www.b4x.com
Now we where wondering when the same ID returns? If we compare this in our database along with date and programlicense wil it stay unique for (more than) a day?
Our app is installed 500+ devices
[B4X] GUID
Sub GUID As String Dim sb As StringBuilder sb.Initialize For Each stp As Int In Array(8, 4, 4, 4, 12) If sb.Length > 0 Then sb.Append("-") For n = 1 To stp Dim c As Int = Rnd(0, 16) If c < 10 Then c = c + 48 Else c = c + 55...

B4X:
Sub GUID As String
'Dim stp As String = "00000000-0000-1000-a000-000000000000" 'original
Dim stp As String = "00000000-0000-1000-a000-00000" 'little bit shorter then in the thread
Dim sb As String = ""
For Index = 0 To stp.Length-1
If stp.CharAt(Index)="0" Then
sb=sb & "0123456789ABCDEF".CharAt(Rnd(0, 16))
Else
sb=sb & stp.CharAt(Index)
End If
Next
Return sb.ToUpperCase
End Sub
Now we where wondering when the same ID returns? If we compare this in our database along with date and programlicense wil it stay unique for (more than) a day?
Our app is installed 500+ devices