Generates unique but random UUID - Android java.util

Android examples for java.util:UUID

Description

Generates unique but random UUID

Demo Code

import android.text.TextUtils;
import android.util.Base64;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Dictionary;
import java.util.Formatter;
import java.util.UUID;

public class Main{

    /** *//*w  w w  . j  a va2s  .c  o m*/
    public static String getUUID() {
        return UUID.randomUUID().toString();
    }

}

Related Tutorials