Venky Venky - 2 months ago 10
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?

Answer

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.

Comments