> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFPlatformSpecificClientAndroidDevicePushNotificationRegistrationAsync

> 注册 Android 设备以接收推送通知

注册 Android 设备以接收推送通知

## 语法

```cpp theme={null}
HRESULT PFPlatformSpecificClientAndroidDevicePushNotificationRegistrationAsync(  
    PFEntityHandle entityHandle,  
    const PFPlatformSpecificAndroidDevicePushNotificationRegistrationRequest* request,  
    XAsyncBlock* async  
)  
```

### 参数

**`entityHandle`**   PFEntityHandle

用于身份验证的 PFEntityHandle。

**`request`**   [PFPlatformSpecificAndroidDevicePushNotificationRegistrationRequest\*](/services/playfab/api-references/c/pfplatformspecifictypes/structs/pfplatformspecificandroiddevicepushnotificationregistrationrequest)

已填充的请求对象。

**`async`**   XAsyncBlock\*<br />*Inout*

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 可在 Android 上使用。有关为 Google Cloud Messaging 服务配置游戏的更多信息，请参阅 Google 开发人员文档：[http://developer.android.com/google/gcm/client.html](http://developer.android.com/google/gcm/client.html)。有关配置和发送推送通知的步骤，请参阅[推送通知快速入门](/services/playfab/live-service-management/game-configuration/title-communications/push-notifications/quickstart)。调用 XAsyncGetStatus 以获取操作状态。如果服务调用不成功，异步结果将为 E\_PF\_NO\_PUSH\_NOTIFICATION\_ARN\_FOR\_TITLE、E\_PF\_PUSH\_SERVICE\_ERROR 或任何全局 PlayFab 服务错误。有关错误处理的更多详细信息，请参阅文档页“Handling PlayFab Errors”。

## 要求

**头文件：** PFPlatformSpecific.h

## 另请参阅

[PFPlatformSpecific 成员](/services/playfab/api-references/c/pfplatformspecific/pfplatformspecific_members)


## Related topics

- [服务 C API 概览 - PFPlatformSpecific.h](/zh-CN/services/playfab/api-references/c/pfplatformspecific/pfplatformspecific_members.md)
- [PFPlatformSpecificAndroidDevicePushNotificationRegistrationRequest](/zh-CN/services/playfab/api-references/c/pfplatformspecifictypes/structs/pfplatformspecificandroiddevicepushnotificationregistrationrequest.md)
- [PFPlatformSpecificClientRegisterForIOSPushNotificationAsync](/zh-CN/services/playfab/api-references/c/pfplatformspecific/functions/pfplatformspecificclientregisterforiospushnotificationasync.md)
- [服务 C API 概览 - PFPlatformSpecificTypes.h](/zh-CN/services/playfab/api-references/c/pfplatformspecifictypes/pfplatformspecifictypes_members.md)
- [PushNotificationRegistration](/zh-CN/services/playfab/api-references/events/data-types/pushnotificationregistration.md)
