I want to generate a unique ID for my application instance once it is installed. Then I want this to ID to be stored in SharedPreferences
so it can be referred to in future.
So the function will look like:
val uniqueID = UUID.randomUUID().toString()
then I would save it to SharedPreferences
.
How do I fire this function only once the application is installed (never to be fired again)?
NOTE: My app is being written in Kotlin