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

# PFAuthenticationServerLoginWithAndroidDeviceIDAsync

> Android デバイス識別子を使用してユーザーをサインインさせ、認証済みユーザーを必要とする以降の API 呼び出しで使用できるセッション識別子を返します

Android デバイス識別子を使用してユーザーをサインインさせ、認証済みユーザーを必要とする以降の API 呼び出しで使用できるセッション識別子を返します

## 構文

```cpp theme={null}
HRESULT PFAuthenticationServerLoginWithAndroidDeviceIDAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const char* secretKey,  
    const PFAuthenticationServerLoginWithAndroidDeviceIDRequest* request,  
    XAsyncBlock* async  
)  
```

### パラメーター

**`serviceConfigHandle`**   PFServiceConfigHandle

PFServiceConfigCreateHandle 呼び出しから返される PFServiceConfigHandle。

**`secretKey`**   char\*<br />*In\_z*

サービス リクエストの認証に使用するタイトル シークレット キー。

**`request`**   [PFAuthenticationServerLoginWithAndroidDeviceIDRequest\*](/ja-jp/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithandroiddeviceidrequest)

値が設定されたリクエスト オブジェクト。

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

非同期操作用の XAsyncBlock。

### 戻り値

型: HRESULT

この API 操作の結果コード。

## 解説

この API は Windows で利用できます。Android デバイスでは、こちらのブログ記事 ([http://android-developers.blogspot.com/2011/03/identifying-app-installations.html](http://android-developers.blogspot.com/2011/03/identifying-app-installations.html)) で説明されているように、AndroidDeviceId として Settings.Secure.ANDROID\_ID を使用することをお勧めします。この識別子の詳細については、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 アカウントにはメールアドレスやユーザー名は関連付けられません。それ以外の場合、Android デバイスに PlayFab アカウントがリンクされていなければ、そのことを示すエラーが返されるため、タイトルはユーザーに PlayFab アカウントの作成を案内できます。この種類のデバイスは複数を 1 つのユーザー アカウントにリンクできますが、ユーザーのアカウント情報に反映されるのは、最後にログインに使用された (または最後にリンクされた) デバイスのみであることに注意してください。今後のリリースで、リンクされているすべてのデバイスを表示するように更新される予定です。非同期タスクが完了したら、[PFAuthenticationServerLoginWithAndroidDeviceIDGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresult) を呼び出して結果を取得します。

## 要件

**ヘッダー:** PFAuthentication.h

## 関連項目

[PFAuthentication のメンバー](/ja-jp/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResultSize](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresultsize.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithandroiddeviceidgetresult.md)
- [PFAuthenticationServerLoginWithAndroidDeviceIDRequest](/ja-jp/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithandroiddeviceidrequest.md)
- [PFAuthenticationServerLoginWithIOSDeviceIDAsync](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidasync.md)
- [PFAuthenticationServerLoginWithIOSDeviceIDGetResult](/ja-jp/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithiosdeviceidgetresult.md)
