6d0f8b01创建于 2024年3月15日历史提交
文件最后提交记录最后更新时间
Issue: #I6DX6A Description: SystemFeature模块,目录结构迁移 Sig: SIG_Sample Feature or Bugfix: Bugfix Binary Source: No Signed-off-by: hongshengquan <hongshengquan3@huawei.com> 3 年前
修复Bluetooth、TaskManagement、StaticSubscriber流水线报错 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 2 年前
Upload、AbilityAccessCtrl、MissionManager、StaticSubscriber、Bluetooth ohpm迁移 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 3 年前
IssueNo: #I6FN5Y:readme整改 Description: readme Update Sig: SIG_applications_app_samples Feature or Bugfix: Feature Binary Source: No Signed-off-by: mashitao2 <mashitao2@huawei.com> 3 年前
description: Add build-profile.json5 ! Sig: SIG_Sample Feature or Bugfix: Bugfix Binary Source: No Signed-off-by: taobohao <taobohao@huawei.com> 3 年前
revert sdk version 10->9 Signed-off-by: sunwenxu <sunwenxu1@huawei.com> 3 年前
修复UI、SystemFeature断链 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 2 年前
revert sdk version 10->9 Signed-off-by: sunwenxu <sunwenxu1@huawei.com> 3 年前
Issue: #I6DX6A Description: SystemFeature模块,目录结构迁移 Sig: SIG_Sample Feature or Bugfix: Bugfix Binary Source: No Signed-off-by: hongshengquan <hongshengquan3@huawei.com> 3 年前
Upload、AbilityAccessCtrl、MissionManager、StaticSubscriber、Bluetooth ohpm迁移 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 3 年前
Upload、AbilityAccessCtrl、MissionManager、StaticSubscriber、Bluetooth ohpm迁移 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 3 年前
Upload、AbilityAccessCtrl、MissionManager、StaticSubscriber、Bluetooth ohpm迁移 Signed-off-by: zwx1126739 <zhanghong121@huawei.com> 3 年前
IssueNo: #I6Y4G8:【sample】HealthyDiet、CrossAppDataShare、WindowExtAbility、Bluetooth、Call添加自动化测试用例,优化ReminderAgentManager Description: 【sample】HealthDiet, CrossAppDataShare, WindowExtAbility、Bluetooth、Call add automated test cases and optimize ReminderAgentManager Sig: SIG_applications_app_samples Feature or Bugfix: Feature Binary Source: No Signed-off-by: mashitao2 <mashitao2@huawei.com> 3 年前
README.md

Bluetooth

Introduction

Bluetooth is a short-range wireless technology used to implement communication between fixed and mobile devices over low-cost short-distance wireless connections. This sample describes how to discover, pair, and unpair Bluetooth devices. The display effect is as follows:

Concepts

Bluetooth: The Bluetooth module provides basic classic Bluetooth capabilities.

Required Permissions

ohos.permission.USE_BLUETOOTH

ohos.permission.LOCATION

ohos.permission.DISCOVER_BLUETOOTH

ohos.permission.MANAGE_BLUETOOTH

ohos.permission.APPROXIMATELY_LOCATION

Usage

  1. Start the app. If Bluetooth is enabled, the system searches for nearby devices that can be paired. If Bluetooth is not enabled, enable it.

  2. After nearby devices are detected, select the device to pair. A dialog box is displayed. Touch Pair to set up a connection with this device; touch Cancel otherwise.

  3. To delete a paired device, touch the device in the paired device list. A dialog box is displayed, asking you whether to disconnect from this device. Touch OK to disconnect from this device; touch Cancel otherwise.

Constraints

  • This sample can only be run on standard-system devices.

  • This sample is based on the stage model, which is supported from API version 9.

  • This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run.

  • The ohos.permission.MANAGE_BLUETOOTH permission used in this sample is of the system_basic level. You need to configure a signature for it. For details about the application permission level (APL), see Permission List.