Venky Venky - 1 month ago 5x
Android Question

Get Value from Parcelable Array in Android

I need to parse and get the Value from :

Parcelable[] uuidExtra = intent.getParcelableArrayExtra("android.bluetooth.device.extra.UUID");

My goal is to get UUID from above Parcelable[]. How to achieve it?


From the docs it states that the extra is a ParcelUuid

So you should use

ParcelUuid uuidExtra intent.getParcelableExtra("android.bluetooth.device.extra.UUID");
UUID uuid = uuidExtra.getUuid();

Hope that helps.