【问题标题】:What is parcelable and why it is used for BluetoothDevice.EXTRA_DEVICE?什么是 parcelable 以及为什么它用于 BluetoothDevice.EXTRA_DEVICE?
【发布时间】:2020-11-28 07:17:57
【问题描述】:

我正在学习 android 中的蓝牙功能。我遇到了BluetoothDevice.EXTRA_DEVICEintent.getParcelable()。我的问题是什么是可包裹的,为什么它与BluetoothDevice.EXTRA_DEVICEintent.getParcelable() 一起使用

我提到了这个answer,但它没有回答

为什么和BluetoothDevice.EXTRA_DEVICE一起使用

【问题讨论】:

标签: android


【解决方案1】:

EXTRA_DEVICE 包含意图适用的蓝牙设备。

device 包含有关设备名称、地址、类型等信息...

【讨论】:

  • 我想知道为什么我们需要使用intent.getParcelableExtra() 来获取EXTRA_DEVICE
猜你喜欢
  • 2011-06-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-09-12
  • 2014-05-27
  • 2011-10-22
  • 1970-01-01
相关资源
最近更新 更多