Venky Venky - 1 year ago 150
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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download