【Android】 BluetoothProfileクラスについて
Android developerのBluetooth機能について理解を深めていきます。
今回のテーマ
BluetoothProfile | Android Developers
public interface BluetoothProfile
概要
Public APIs for the Bluetooth Profiles.
Clients should call BluetoothAdapter#getProfileProxy, to get the Profile Proxy. Each public profile implements this interface.
BluetoothプロファイルのパブリックAPI。
クライアントはBluetoothAdapter#getProfileProxyを呼び出して、プロファイルプロキシを取得する必要があります。 各パブリックプロファイルは、このインターフェイスを実装しています。
Nested Classes
Nested Classes | 詳細 |
---|---|
interface BluetoothProfile.ServiceListener | An interface for notifying BluetoothProfile IPC clients when they have been connected or disconnected to the service. サービスに接続または切断されたときにBluetoothProfile IPCクライアントに通知するためのインターフェース。 |
※IPC(interprocess communication) : 動作中のプログラムの間でデータの交換をすること。プロセス間通信。
Constants
重要な項目はないため略。
Public methods
Public methods | 詳細 |
---|---|
abstract List 〈BluetoothDevice〉getConnectedDevices() | Get connected devices for this specific profile. この特定のプロファイルの接続デバイスを取得します。 |
abstract int getConnectionState(BluetoothDevice device) | Get the current connection state of the profile Requires Manifest.permission.BLUETOOTH プロファイルの現在の接続状態を取得します Manifest.permission.BLUETOOTHが必要 |
abstract List〈BluetoothDevice〉getDevicesMatchingConnectionStates(int[] states) | Get a list of devices that match any of the given connection states. 指定された接続状態のいずれかに一致するデバイスのリストを取得します。 |