I am learning about bluetooth in android.
I am wondering why do we use intent.getParcelable()
on BluetoothDevice.EXTRA_DEVICE
when its return type is string?
Why don't we use intent.getStringExtra
?
it isn't returning String
, its BluetoothDevice
(which implements Parcleable
)
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);