ネストされたクラス |
---|
enum | Sl4aBluetoothUtil.BluetoothAccessLevel 基づいているのBluetoothデバイスのアクセスレベルの列挙型BluetoothDevice.java |
enum | Sl4aBluetoothUtil.BluetoothConnectionState 基づいているBluetooth接続状態の列挙型の値BluetoothProfile.java |
enum | Sl4aBluetoothUtil.BluetoothPriorityLevel 基づいているのBluetoothプロファイルの優先順位のための列挙型BluetoothProfile.java |
enum | Sl4aBluetoothUtil.BluetoothProfile 基づいているBluetoothプロファイルの列挙型の値BluetoothProfile.java |
パブリックメソッド |
---|
boolean | changeProfileAccessPermission (ITestDevice primary, ITestDevice secondary, Sl4aBluetoothUtil.BluetoothProfile profile, Sl4aBluetoothUtil.BluetoothAccessLevel access) セカンダリデバイスが特定のプロファイルのプライマリデバイスにアクセスできるように、プライマリデバイスのセカンダリデバイスのBluetoothプロファイルアクセス許可を変更します |
boolean | connect (ITestDevice primary, ITestDevice secondary, profiles) connect (ITestDevice primary, ITestDevice secondary, profiles) 特定のBluetoothプロファイルでプライマリデバイスをセカンダリデバイスに接続します |
boolean | disable (ITestDevice device) ターゲットデバイスでBluetoothを無効にする |
boolean | disableBluetoothSnoopLog (ITestDevice device) Bluetoothスヌープログを無効にする |
boolean | disconnect (ITestDevice primary, ITestDevice secondary, profiles) disconnect (ITestDevice primary, ITestDevice secondary, profiles) プライマリデバイスをセカンダリデバイスから切断します |
boolean | enable (ITestDevice device) ターゲットデバイスでBluetoothを有効にする |
boolean | enableBluetoothSnoopLog (ITestDevice device) Bluetoothスヌープログを有効にする |
String | getAddress (ITestDevice device) ターゲットデバイスのBluetoothMACアドレスを取得します |
| getBondedDevices (ITestDevice device) ターゲットデバイス上の結合された(ペアになっている)デバイスのBluetoothMACアドレスのセットを取得します |
boolean | pair (ITestDevice primary, ITestDevice secondary) プライマリデバイスをセカンダリデバイスにペアリングする |
void | setBtConnectionTimeout (Duration timeout) |
void | setBtPairTimeout (Duration timeout) |
boolean | setProfilePriority (ITestDevice primary, ITestDevice secondary, profiles, Sl4aBluetoothUtil.BluetoothPriorityLevel priority) setProfilePriority (ITestDevice primary, ITestDevice secondary, profiles, Sl4aBluetoothUtil.BluetoothPriorityLevel priority) プライマリデバイスの特定のプロファイルの優先度設定をセカンダリデバイスに変更します |
void | startSl4a (ITestDevice device, File sl4aApkFile) 指定されたデバイスとSL4Aapkファイルを使用してSL4Aクライアントを明示的に起動します。 |
void | stopSl4a () すでに開かれているSL4Aクライアントを停止します。 |
boolean | unpairAll (ITestDevice device) 現在のデバイスのペアリングされたすべてのデバイスのペアリングを解除します |
保護されたメソッド |
---|
void | finalize () すべてのSL4A接続をクリーンアップします |
パブリックコンストラクター
Sl4aBluetoothUtil
public Sl4aBluetoothUtil ()
パブリックメソッド
changeProfileAccessPermission
public boolean changeProfileAccessPermission (ITestDevice primary,
ITestDevice secondary,
Sl4aBluetoothUtil.BluetoothProfile profile,
Sl4aBluetoothUtil.BluetoothAccessLevel access)
セカンダリデバイスが特定のプロファイルのプライマリデバイスにアクセスできるように、プライマリデバイスのセカンダリデバイスのBluetoothプロファイルアクセス許可を変更します
パラメーター |
---|
primary | ITestDevice :デバイス変更許可へ |
secondary | ITestDevice :指定したプロファイルにプライマリデバイスにアクセスするデバイス |
profile | Sl4aBluetoothUtil.BluetoothProfile :アクセスへのBluetoothプロファイル |
access | Sl4aBluetoothUtil.BluetoothAccessLevel :アクセスのレベル、参照BluetoothAccessLevel |
戻り値 |
---|
boolean | 権限が正常に変更された場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
接続
public boolean connect (ITestDevice primary,
ITestDevice secondary,
profiles)
特定のBluetoothプロファイルでプライマリデバイスをセカンダリデバイスに接続します
パラメーター |
---|
primary | ITestDevice :デバイスから接続します |
secondary | ITestDevice :デバイスがに接続します |
profiles | :Bluetoothプロファイルのセットを接続する必要があります |
投げる |
---|
DeviceNotAvailableException | |
無効にする
public boolean disable (ITestDevice device)
ターゲットデバイスでBluetoothを無効にする
パラメーター |
---|
device | ITestDevice :ターゲットデバイス |
戻り値 |
---|
boolean | Bluetoothが正常に無効化された場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
disableBluetoothSnoopLog
public boolean disableBluetoothSnoopLog (ITestDevice device)
Bluetoothスヌープログを無効にする
パラメーター |
---|
device | ITestDevice :無効スヌープ・ログに |
戻り値 |
---|
boolean | 正常に無効にされた場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
切断する
public boolean disconnect (ITestDevice primary,
ITestDevice secondary,
profiles)
プライマリデバイスをセカンダリデバイスから切断します
パラメーター |
---|
primary | ITestDevice :デバイスが切断操作を実行します |
secondary | ITestDevice :デバイスが切断されます |
profiles | :切断する必要があるBluetoothプロファイルの特定のセット |
戻り値 |
---|
boolean | 正常に切断された場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
有効
public boolean enable (ITestDevice device)
ターゲットデバイスでBluetoothを有効にする
パラメーター |
---|
device | ITestDevice :ターゲットデバイス |
戻り値 |
---|
boolean | Bluetoothが正常に有効になっている場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
enableBluetoothSnoopLog
public boolean enableBluetoothSnoopLog (ITestDevice device)
Bluetoothスヌープログを有効にする
パラメーター |
---|
device | ITestDevice :スヌープ・ログを有効にするには |
戻り値 |
---|
boolean | 正常に有効にした場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
getAddress
public String getAddress (ITestDevice device)
ターゲットデバイスのBluetoothMACアドレスを取得します
パラメーター |
---|
device | ITestDevice :ターゲットデバイス |
投げる |
---|
DeviceNotAvailableException | |
getBondedDevices
public getBondedDevices (ITestDevice device)
ターゲットデバイス上の結合された(ペアになっている)デバイスのBluetoothMACアドレスのセットを取得します
パラメーター |
---|
device | ITestDevice :ターゲットデバイス |
投げる |
---|
DeviceNotAvailableException | |
ペア
public boolean pair (ITestDevice primary,
ITestDevice secondary)
プライマリデバイスをセカンダリデバイスにペアリングする
パラメーター |
---|
primary | ITestDevice :からペアのデバイス |
secondary | ITestDevice :ペアにデバイスへ |
戻り値 |
---|
boolean | ペアリングが成功した場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
setBtConnectionTimeout
public void setBtConnectionTimeout (Duration timeout)
setBtPairTimeout
public void setBtPairTimeout (Duration timeout)
setProfilePriority
public boolean setProfilePriority (ITestDevice primary,
ITestDevice secondary,
profiles,
Sl4aBluetoothUtil.BluetoothPriorityLevel priority)
プライマリデバイスの特定のプロファイルの優先度設定をセカンダリデバイスに変更します
パラメーター |
---|
primary | ITestDevice :上の設定した優先順位の装置 |
secondary | ITestDevice :設定した優先順位にデバイスのための |
profiles | :優先度設定を変更するBluetoothプロファイル |
priority | Sl4aBluetoothUtil.BluetoothPriorityLevel :優先度 |
戻り値 |
---|
boolean | 優先度の設定に成功した場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
startSl4a
public void startSl4a (ITestDevice device,
File sl4aApkFile)
指定されたデバイスとSL4Aapkファイルを使用してSL4Aクライアントを明示的に起動します。 SL4A接続は常に実際の操作の前に確立されるため、通常、この方法は必要ありません。
パラメーター |
---|
device | ITestDevice :デバイスはSL4Aを使用して接続します |
sl4aApkFile | File :インストールして使用するには、オプションのSL4AのAPK。 |
投げる |
---|
DeviceNotAvailableException | |
stopSl4a
public void stopSl4a ()
すでに開かれているSL4Aクライアントを停止します。基本的に、クライアントが使用されなくなった直後にクライアントをクリーンアップする方法を提供します
unpairAll
public boolean unpairAll (ITestDevice device)
現在のデバイスのペアリングされたすべてのデバイスのペアリングを解除します
パラメーター |
---|
device | ITestDevice :アクションを実行するために、現在のデバイス |
戻り値 |
---|
boolean | ペアリングが正常に解除された場合はtrue |
投げる |
---|
DeviceNotAvailableException | |
保護されたメソッド
ファイナライズ
protected void finalize ()
すべてのSL4A接続をクリーンアップします
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2021-10-04 UTC.
[]
[]