Question

I'd like to pass a UUID identifying an object in an ArrayList to an intent, so that the recieving activity can find the object in the Arraylist using the id.

Is this possible, or is there a better way to achieve the same result?

Was it helpful?

Solution

You can pass UUID.toString() (as String in the intent). It returns the string representation of the UUID as specified in the RFC 4122. Anyway the UUID class implements the Serializable interface, so you can also pass it as object

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top