com.deque.networking.utils.DistinctId.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of axe-devtools-android-core Show documentation
Show all versions of axe-devtools-android-core Show documentation
The Axe Devtools Android Core Library
package com.deque.networking.utils
import java.util.UUID
class DistinctId(val userId: String?, val email: String?) {
private val uuid: UUID
init {
val combinedUserIdAndEmail = "${userId}/${email}"
uuid = if (userId.isNullOrEmpty()) {
UUID.randomUUID()
} else {
UUID.nameUUIDFromBytes(combinedUserIdAndEmail.toByteArray())
}
}
override fun toString(): String = uuid.toString()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy