Android developers 翻訳 - android.bluetooth

今日はbluetoothを訳してみました。ご参考までに。

・リンクなど本家サイトも並行して参照して下さい。
http://developer.android.com/intl/ja/reference/android/bluetooth/BluetoothAdapter.html
・public Methodsは抜粋して訳しています。リクエストがありましたら他のメソッドも訳します:)

        • -


BluetoothAdapter

Class Overview
Represents the local device Bluetooth adapter. The BluetoothAdapter lets you perform fundamental Bluetooth tasks, such as initiate device discovery, query a list of bonded (paired) devices, instantiate a BluetoothDevice using a known MAC address, and create a BluetoothServerSocket to listen for connection requests from other devices.
●ローカルデバイスブルートゥースアダプタを表わします。 BluetoothAdapterによって、デバイス探索開始やボンドされた(ペアになった)デバイスリストのクエリ、既知のMACアドレスを使ってBluetoothDeviceのインスタント化、他デバイスからの接続リクエストをリスンする為にBluetoothServerSocketを生成、等といった基本的なブルートゥースタスクを実行できるようになります。

To get a BluetoothAdapter representing the local Bluetooth adapter, call the static getDefaultAdapter() method. Fundamentally, this is your starting point for all Bluetooth actions. Once you have the local adapter, you can get a set of BluetoothDevice objects representing all paired devices with getBondedDevices(); start device discovery with startDiscovery(); or create a BluetoothServerSocket to listen for incoming connection requests with listenUsingRfcommWithServiceRecord(String, UUID).
●ローカルのブルートゥースアダプタを表すBluetoothAdapterを取得する為には、static のgetDefaultAdapter()メソッドをコールして下さい。基本的にこれがすべてのブルートゥースアクションの開始ポイントになります。ローカルアダプタを取得したら、getBondedDevices()によってペアになっている全ての端末を表すBluetoothDeviceオブジェクトを取得することができます。startDiscovery()でデバイス探索を開始することできますし、またlistenUsingRfcommWithServiceRecord(String,UUID)でインカミングの接続要求をリスンする為のBluetoothServerSocketを生成することができます。

Note: Most methods require the BLUETOOTH permission and some also require the BLUETOOTH_ADMIN permission.
●注意:ほとんどのメソッドでは、BLUETOOTHパーミッションが必要となります。BLUETOOTH ADMINパーミッションが必要となるものもあります。

      • -

public Set getBondedDevices ()
Since: API Level 5
Return the set of BluetoothDevice objects that are bonded (paired) to the local adapter.
Requires BLUETOOTH.
Returns
unmodifiable set of BluetoothDevice, or null on error

●ローカルアダプタにボンドされた(ペアになった)BluetoothDeviceオブジェクトをリターンします。BLUETOOTHパーミッション必要。
リターン
変更できないBluetoothDevice。エラー時はnull。

      • -

public static synchronized BluetoothAdapter getDefaultAdapter ()
Since: API Level 5
Get a handle to the default local Bluetooth adapter.
Currently Android only supports one Bluetooth adapter, but the API could be extended to support more. This will always return the default adapter.
Returns
the default local adapter, or null if Bluetooth is not supported on this hardware platform

●デフォルトのローカルブルートゥースアダプタのハンドルを取得します。
現在Androidではブルートゥースアダプタを一つだけサポートしていますが、APIはもっとサポートできるように拡張できます。常にデフォルトのアダプタをリターンします。
リターン
デフォルトのローカルアダプタ。ハードウェアプラットフォームでブルートゥースがサポートされていなければnull。

      • -

public BluetoothServerSocket listenUsingRfcommWithServiceRecord (String name, UUID uuid)
Since: API Level 5
Create a listening, secure RFCOMM Bluetooth socket with Service Record.
A remote device connecting to this socket will be authenticated and communication on this socket will be encrypted.
●リスナーを生成、安全なRFCOMMブルートゥースソケットをService Record付きで生成します。このソケットに接続してくるリモートデバイスは認証を受け、このソケット上の通信は暗号化されます。

Use accept() to retrieve incoming connections from a listening BluetoothServerSocket.
The system will assign an unused RFCOMM channel to listen on.
●BluetoothServerSocketをリスンしていて入ってくる接続を取り出すにはaccept()を使用して下さい。
システムは未使用のRFCOMMチャネルをリスン用にアサインします。

The system will also register a Service Discovery Protocol (SDP) record with the local SDP server containing the specified UUID, service name, and auto-assigned channel. Remote Bluetooth devices can use the same UUID to query our SDP server and discover which channel to connect to. This SDP record will be removed when this socket is closed, or if this application closes unexpectedly.
Use createRfcommSocketToServiceRecord(UUID) to connect to this socket from another device using the same UUID.
Requires BLUETOOTH
●システムはまた特定UUID、サービス名、自動アサインチャネルを含んだローカルSDPサーバを伴ったSDPレコード(Service Discovery Protocol record)を登録します。リモートのブルートゥースバイスはこちらのSDPサーバをクエリする為またどのチャネルに接続するかを決める為に同じUUIDを使用することができます。このソケットがクローズされた時、またはこのアプリケーションが予定外にクローズした場合にこのSDPレコードは除去されます。
他デバイスから同じUUIDでこのソケットへ接続する為にはcreateRfcommSocketToServiceRecord(UUID)を使用して下さい。
BLUETOOTHパーミッションが必要。

      • -

public boolean startDiscovery ()
Since: API Level 5
Start the remote device discovery process.
The discovery process usually involves an inquiry scan of about 12 seconds, followed by a page scan of each new device to retrieve its Bluetooth name.
●リモートデバイスの探索プロセスを開始します。
探索プロセスには、通常約12秒の問い合わせスキャンがあり、次にそれぞれの新規デバイスブルートゥース名を探す為のページスキャンがあります。

This is an asynchronous call, it will return immediately. Register for ACTION_DISCOVERY_STARTED and ACTION_DISCOVERY_FINISHED intents to determine exactly when the discovery starts and completes. Register for ACTION_FOUND to be notified as remote Bluetooth devices are found.
●非同期コールでありすぐにリターンされます。ACTION_DISCOVERY_STARTED, ACTION_DISCOVERY_FINISHEDの登録は厳密にいつ探索が開始されたか完了したかを知る為のものです。ACTION_FOUNDを登録すると、リモートブルートゥースバイスが見つけられた時に通知されます。

Device discovery is a heavyweight procedure. New connections to remote Bluetooth devices should not be attempted while discovery is in progress, and existing connections will experience limited bandwidth and high latency. Use cancelDiscovery() to cancel an ongoing discovery. Discovery is not managed by the Activity, but is run as a system service, so an application should always call cancelDiscovery() even if it did not directly request a discovery, just to be sure.
●デバイス探索は重い処理です。探索中リモートブルートゥースバイスへの新規接続は試みるべきではなく、既存の接続ではバンド幅が限定されたり長い遅延になります。実行中の探索をキャンセルするにはcancelDiscovery()を使用して下さい。探索はActivityによって管理されるものではなく、システムのサービスとして実行されます。よってアプリケーションは直接探索をリクエストしていなくても常にcancelDiscovery()をコールするべきです。念のため。

Device discovery will only find remote devices that are currently discoverable (inquiry scan enabled). Many Bluetooth devices are not discoverable by default, and need to be entered into a special mode.
Requires BLUETOOTH_ADMIN.
●デバイス探索では現在discoverable(問い合わせスキャンenabled)のリモートデバイスのみを見つけます。ブルートゥースバイスの多くはデフォルトでdiscoverableではなく、特別なモードに入ることが必要になります。
BLUETOOTH_ADMINパーミッションが必要。