1# @ohos.bluetooth.pbap (蓝牙pbap模块) 2 3pbap模块提供了访问电话簿相关功能的方法。 4 5> **说明:** 6> 7> 本模块首批接口从API version 11开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 8 9 10 11## 导入模块 12 13```js 14import pbap from '@ohos.bluetooth.pbap'; 15``` 16 17 18## pbap.createPbapServerProfile 19 20createPbapServerProfile(): PbapServerProfile 21 22创建pbapServer profile实例。 23 24**系统能力**:SystemCapability.Communication.Bluetooth.Core。 25 26**返回值:** 27 28| 类型 | 说明 | 29| ----------------------------- | ---------- | 30| PbapServerProfile | 返回该profile的实例。 | 31 32**示例:** 33 34```js 35import { BusinessError } from '@ohos.base'; 36try { 37 let pbapServerProfile = pbap.createPbapServerProfile(); 38 console.info('pbapServer success'); 39} catch (err) { 40 console.error('errCode: ' + (err as BusinessError).code + ', errMessage: ' + (err as BusinessError).message); 41} 42``` 43