generate uuid === ```java= public String createTransactionID() throws Exception{ String uuid = UUID.randomUUID().toString().replaceAll("-", "").toUpperCase(); return uuid.replaceAll("(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})", "$1-$2-$3-$4-$5"); } ``` ## Ref. [Generating unique id in android (UUID)](https://stackoverflow.com/a/40237325) ###### tags: `實作相關`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up