説明 |
端末のBluetooth機能の有効/無効を設定します。
Android版
|
|
呼出形式 |
Runtime.SetBluetoothEnabled( enabled )
|
|
戻り値 |
なし
|
|
引数 |
boolean enabled |
端末のBluetooth機能を有効にするか否かを指定します。
|
例外 |
RTM-84 |
Bluetoothの使用が許可されていません。OSの設定でBluetoothの使用を許可してください。 *1 |
|
RTM-113 |
Bluetoothデバイス制御はサポートされていません。 |
|
RTM-114 |
Bluetoothを有効化できませんでした。 |
|
RTM-115 |
Bluetoothを無効化できませんでした。 |
使用例 |
if(!Runtime.IsBluetoothEnabled()){ MessageBox("Bluetooth機能をONにします。"); try { Runtime.SetBluetoothEnabled(true); } catch (e) { //.Message("例外", e.Message, "が発生しました"); } } else { /* Bluetooth機能を使用することができます */ }
|
|
関連項目 |