> ## 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.

# PFAuthenticationServerLoginWithAndroidDeviceIDRequest

> 使用 Android 设备 ID（例如 Settings.Secure.ANDROID_ID）登录的服务器请求数据。CreateAccount 会创建并链接新的 PlayFab 帐户。

PFAuthenticationServerLoginWithAndroidDeviceIDRequest 数据模型。在 Android 设备上，建议使用 Settings.Secure.ANDROID\_ID 作为 AndroidDeviceId，如此博客文章 ([http://android-developers.blogspot.com/2011/03/identifying-app-installations.html](http://android-developers.blogspot.com/2011/03/identifying-app-installations.html)) 中所述。有关此标识符的更多信息，请参阅 Android 文档 ([http://developer.android.com/reference/android/provider/Settings.Secure.html](http://developer.android.com/reference/android/provider/Settings.Secure.html))。如果这是用户首次使用该 Android 设备登录且 CreateAccount 设为 true，将创建一个新的 PlayFab 帐户并链接到该 Android 设备 ID。在这种情况下，该 PlayFab 帐户将没有关联的电子邮件或用户名。否则，如果没有 PlayFab 帐户链接到该 Android 设备，将返回相应的错误，以便游戏引导用户创建 PlayFab 帐户。请注意，虽然可以将多个此类设备链接到单个用户帐户，但用户的帐户信息中只会反映最近用于登录（或最近链接）的设备。我们将在未来的版本中进行更新，以显示所有已链接的设备。

## 语法

```cpp theme={null}
typedef struct PFAuthenticationServerLoginWithAndroidDeviceIDRequest {  
    const char* androidDevice;  
    const char* androidDeviceId;  
    bool createAccount;  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFGetPlayerCombinedInfoRequestParams const* infoRequestParameters;  
    const char* OS;  
} PFAuthenticationServerLoginWithAndroidDeviceIDRequest;  
```

### 成员

**`androidDevice`**   const char\*<br />*is null-terminated*

（可选）用户设备的具体型号。

**`androidDeviceId`**   const char\*<br />*is null-terminated*

用户设备的 Android 设备标识符。

**`createAccount`**   bool

如果当前没有 PlayFab 帐户链接到此 ID，则自动创建一个。

**`customTags`**   PFStringDictionaryEntry const\*<br />*may be nullptr*

（可选）与请求关联的可选自定义标记（例如生成号、外部跟踪标识符等）。

**`customTagsCount`**   uint32\_t

customTags 的数量

**`infoRequestParameters`**   PFGetPlayerCombinedInfoRequestParams const\*<br />*may be nullptr*

（可选）用于指定要为用户返回哪些信息的标志。

**`OS`**   const char\*<br />*is null-terminated*

（可选）用户设备的具体操作系统版本。

## 要求

**头文件：** PFAuthenticationTypes.h

## 另请参阅

[PFAuthenticationTypes 成员](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

- [PFAuthenticationServerLoginWithAndroidDeviceIDAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidasync.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresult.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresultsize.md)
- [PFAuthenticationServerLoginWithIOSDeviceIDRequest](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithiosdeviceidrequest.md)
- [PFAuthenticationServerLoginWithIOSDeviceIDAsync](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidasync.md)
