> ## 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 裝置識別碼 (例如 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 裝置識別碼。在此情況下，不會有任何電子郵件或使用者名稱與該 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 帳戶連結至此識別碼，則自動建立一個。

**`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-TW/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

- [PFAuthenticationServerLoginWithAndroidDeviceIDAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidasync.md)
- [服務 C API 概觀 - PFAuthenticationTypes.h](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResult](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresult.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResultSize](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresultsize.md)
- [PFAuthenticationServerLoginWithIOSDeviceIDRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithiosdeviceidrequest.md)
