跳轉到主要內容
PFAuthenticationServerLoginWithAndroidDeviceIDRequest 資料模型。在 Android 裝置上,建議使用 Settings.Secure.ANDROID_ID 作為 AndroidDeviceId,如這篇部落格文章 (http://android-developers.blogspot.com/2011/03/identifying-app-installations.html) 所述。如需此識別碼的詳細資訊,請參閱 Android 文件 (http://developer.android.com/reference/android/provider/Settings.Secure.html)。如果這是使用者第一次使用該 Android 裝置登入,且 CreateAccount 設定為 true,系統將會建立新的 PlayFab 帳戶,並將其連結至該 Android 裝置識別碼。在此情況下,不會有任何電子郵件或使用者名稱與該 PlayFab 帳戶相關聯。否則,如果沒有任何 PlayFab 帳戶連結至該 Android 裝置,將會傳回指出此情況的錯誤,讓遊戲能引導使用者建立 PlayFab 帳戶。請注意,雖然可以將多個此類型的裝置連結至單一使用者帳戶,但使用者的帳戶資訊中只會反映最近用來登入 (或最近連結) 的裝置。我們將在未來的版本中更新為顯示所有已連結的裝置。

語法

成員

androidDevice   const char*
is null-terminated
(選擇性)使用者裝置的特定型號。 androidDeviceId   const char*
is null-terminated
使用者裝置的 Android 裝置識別碼。 createAccount   bool 如果目前沒有 PlayFab 帳戶連結至此識別碼,則自動建立一個。 customTags   PFStringDictionaryEntry const*
may be nullptr
(選擇性)與要求相關聯的選擇性自訂標籤(例如組建編號、外部追蹤識別碼等)。 customTagsCount   uint32_t customTags 的計數 infoRequestParameters   PFGetPlayerCombinedInfoRequestParams const*
may be nullptr
(選擇性)指定要為使用者傳回哪些資訊的旗標。 OS   const char*
is null-terminated
(選擇性)使用者裝置的特定作業系統版本。

需求

標頭: PFAuthenticationTypes.h

另請參閱

PFAuthenticationTypes 成員
最後修改於 2026年10月6日