Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I pass a uuid in an intent?

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?

like image 683
abc32112 Avatar asked Oct 18 '25 01:10

abc32112


1 Answers

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

like image 146
Blackbelt Avatar answered Oct 19 '25 14:10

Blackbelt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!