Created
June 27, 2020 14:43
-
-
Save jsfan3/2fdc5fae2b723cba40e65faab923e552 to your computer and use it in GitHub Desktop.
UIID Generation Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form hi = new Form("Test UIID", BoxLayout.y()); | |
Button button = new Button("Generate 10 UIID"); | |
hi.add(button); | |
hi.show(); | |
button.addActionListener(l -> { | |
String myId = "myUsername"; // do not exceed 12 characters | |
Preferences.set("CustomDeviceId__$", Long.parseLong(myId, 36)); | |
hi.add(new SpanLabel("10 Random UUID")); | |
for (int i = 0; i < 10; i++) { | |
hi.add(new SpanLabel(Util.getUIID())); | |
} | |
hi.revalidate(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment