# QESDK 原生 API 概述

Source: [https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_api.html](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_api.html)

QESDK NDK 库提供用于注册 Android 应用程序包 (APK)、验证相应许可证文件以及调用子系统 API 的主要方法。

- **[qesdk_init](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_init.html)**  

**此 API 已弃用。使用 [qesdk_initEx](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_init_ex.html)。**通过用户提供的许可证密钥初始化 QESDK 会话。qesdk\_initEx 会触发针对 QESDK 的鉴权调用，如果鉴权成功，则返回 QESDK 服务句柄；如果鉴权失败，则返回 NULL。
- **[qesdk_initEx](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_init_ex.html)**  

通过用户提供的许可证密钥初始化 QESDK 会话。qesdk\_initEx 会触发针对 QESDK 的鉴权调用，如果鉴权成功，则返回 QESDK 服务句柄；如果鉴权失败，则返回 NULL。每个会话只调用一次此 API。
- **[Qesdk 事件回调](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_fwk_event_callback.html)**  

需要在 qesdk\_init 调用期间注册为回调。客户端应实现该回调，以便在注册的服务不可用时调用。具体调用方式为传递参数，即失败服务的 opcodes 和 subsystems[] 组合。
- **[qesdk_deinit](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_deinit.html)**  

终止由应用程序发起的 QESDK 连接。在应用程序退出后或通过显式调用 qesdk\_deinit 函数终止 QESDK 连接。通过 QESDK 框架注册的任何 API 回调都将取消。
- **[单个子系统 init 和 de-init](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/individual_subsystem_init_and_de_init.html)**  

应用程序可以独立初始化和注销服务。
- **[QESDK 结构体](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_structs.html)**
- **[QESDK 枚举](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_enums.html)**  

**已弃用。**
- **[函数执行](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_functions.html)**  

**已弃用。**介绍用于调用子系统 API 的函数执行 API。
- **[示例代码](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/native_example_code.html)**

**Parent Topic:** [QESDK 概述](https://docs.qualcomm.com/doc/80-PK177-134Y/topic/qesdk_overview.html)

Last Published: Jun 22, 2023

[Previous Topic
示例代码](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134Y/topics/java_example_code.md) [Next Topic
qesdk\_init](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134Y/topics/native_init.md)