Bluetooth API Translation ____①_____android.bluetooth Introduction

Source: Internet
Author: User

Introduction: Recently in the study of Bluetooth development, take this opportunity to translate the Xia Guan Web document about the Bluetooth part, and then learn how to use Bluetooth to develop Bluetooth chat software and file transfer software, the way to improve their English document reading ability.

English Original address: http://www.androidcommunitydocs.com/reference/android/bluetooth/package-summary.html

Body:

The Android.bluetooth package provides a number of classes that manage Bluetooth functionality, such as scanning nearby Bluetooth devices, connecting devices, and managing data transfer between devices.

If you need more detailed information, you can see it in the next blog post .

The Bluetooth API allows applications to:

① Scan other Bluetooth devices.

② a paired Bluetooth device with a local Bluetooth adapter.

③ Establish Rfcomm Channel/sockets.

④ connect the specified sockets of other devices.

The ⑤ transmits data between devices.

in order to use these AIP to achieve Bluetooth communication, the BLUETOOTH(Allows applications to connect to paired bluetooth devices)权限。一些额外的功能,例如允许设备查找,需要声明 application must declare   BLUETOOTH_ADMIN(Allows applications to discover and pair bluetooth devices)权限。

Note: Not all Android devices support the Bluetooth feature.

Interface:

Bluetoothadapter.lescancallback The callback interface for low-power device lookup results.
Bluetoothprofile Common API for Bluetooth configuration
Bluetoothprofile.servicelistener The client connects or disconnects the service's notification interface

Class:

Bluetootha2dp "A2DP" is the abbreviation for Advanced Audio distribution profiles. This class defines how to stream high-quality audio from one device to another through a Bluetooth connection.
Bluetoothadapter Local Bluetooth adapter. The function is to find a Bluetooth device, get a paired device, and use a MAC address instance Bluetoothdevice object.
Bluetoothassignednumbers Bluetooth Assigned Numbers.
Bluetoothclass Describes the nature and capabilities of the device. For example, indicate the type of device (cell phone, computer, headset), and whether it has audio and telephone functions.
Bluetoothclass.device All device class constants are defined.
BluetoothClass.Device.Major All important device constants are defined.
Bluetoothclass.service All the service-side class constants are defined.
Bluetoothdevice Represents a remote device.
Bluetoothgatt Public API for the Bluetooth GATT profile.
Bluetoothgattcallback BluetoothGattthe abstract class that implements the callback.
bluetoothgattcharacteristic  represents a Bluetooth GATT characteristic

a GATT characteristic is A basic data element used to Construct a GATT service,  bluetoothgattservice .  

Bluetoothgattdescriptor Represents a Bluetooth GATT descriptor

GATT descriptors contain additional information and attributes of a GATT characteristic, BluetoothGattCharacteristic .

Bluetoothgattserver Public API for the Bluetooth GATT profile server role.
Bluetoothgattservercallback This abstract class was used to implement BluetoothGattServer callbacks.
Bluetoothgattservice Represents a Bluetooth GATT Service

Gatt Service contains a collection BluetoothGattCharacteristic of, as well as referenced services.

Bluetoothheadset API to control the Bluetooth headset service
Bluetoothhealth APIs for Bluetooth-related health applications
Bluetoothhealthappconfiguration BluetoothHealthconfiguration information for the Bluetooth-related health class app that is used with the class.
Bluetoothhealthcallback BluetoothHealththe abstract class used to implement the callback.
Bluetoothmanager High level manager, used to get BluetoothAdapter the instance, and control all the Bluetooth management.
Bluetoothserversocket A Bluetooth-listening socket, the server socket.
Bluetoothsocket A connected, or connected socket.

Some of them are difficult to understand without translation, and then come back to revise the supplement when you learn that part.

Bluetooth API Translation ____①_____android.bluetooth Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.