# BeginCreateCredentialRequest

Artifact: [androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials) [View Source](https://cs.android.com/search?q=file:androidx/credentials/provider/BeginCreateCredentialRequest.kt+class:androidx.credentials.provider.BeginCreateCredentialRequest) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

*** ** * ** ***


```
public abstract class BeginCreateCredentialRequest
```

<br />

Known direct subclasses [BeginCreateCustomCredentialRequest](https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCustomCredentialRequest), [BeginCreatePasswordCredentialRequest](https://developer.android.com/reference/androidx/credentials/provider/BeginCreatePasswordCredentialRequest), [BeginCreatePublicKeyCredentialRequest](https://developer.android.com/reference/androidx/credentials/provider/BeginCreatePublicKeyCredentialRequest)

|---|---|
| `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCustomCredentialRequest` | Base custom begin create request class for registering a credential. |
| `https://developer.android.com/reference/androidx/credentials/provider/BeginCreatePasswordCredentialRequest` | Request to begin saving a password credential, received by the provider with a CredentialProviderBaseService.onBeginCreateCredentialRequest call. |
| `https://developer.android.com/reference/androidx/credentials/provider/BeginCreatePublicKeyCredentialRequest` | Request to begin registering a public key credential. |

*** ** * ** ***

Abstract request class for beginning a create credential request.

This class is to be extended by structured create credential requests such as `https://developer.android.com/reference/androidx/credentials/provider/BeginCreatePasswordCredentialRequest`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#BeginCreateCredentialRequest(kotlin.String,android.os.Bundle,androidx.credentials.provider.CallingAppInfo)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html type, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html candidateQueryData, https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo callingAppInfo )` |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#asBundle(androidx.credentials.provider.BeginCreateCredentialRequest)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest request)` Helper method to convert the class to a parcelable `https://developer.android.com/reference/android/os/Bundle.html`, in case the class instance needs to be sent across a process. |
| `static final https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest` | `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#fromBundle(android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html bundle)` Helper method to convert a `https://developer.android.com/reference/android/os/Bundle.html` retrieved through `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#asBundle(androidx.credentials.provider.BeginCreateCredentialRequest)`, back to an instance of `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest`. |
| `final https://developer.android.com/reference/androidx/credentials/provider/CallingAppInfo` | `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#getCallingAppInfo()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#getCandidateQueryData()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#getType()()` |

## Public constructors

### BeginCreateCredentialRequest

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public BeginCreateCredentialRequest(
    @NonNull String type,
    @NonNull Bundle candidateQueryData,
    CallingAppInfo callingAppInfo
)
```

## Public methods

### asBundle

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public static final @NonNull Bundle asBundle(@NonNull BeginCreateCredentialRequest request)
```

Helper method to convert the class to a parcelable `https://developer.android.com/reference/android/os/Bundle.html`, in case the class instance needs to be sent across a process. Consumers of this method should use `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#fromBundle(android.os.Bundle)` to reconstruct the class instance back from the bundle returned here.

### fromBundle

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public static final BeginCreateCredentialRequest fromBundle(@NonNull Bundle bundle)
```

Helper method to convert a `https://developer.android.com/reference/android/os/Bundle.html` retrieved through `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest#asBundle(androidx.credentials.provider.BeginCreateCredentialRequest)`, back to an instance of `https://developer.android.com/reference/androidx/credentials/provider/BeginCreateCredentialRequest`.

### getCallingAppInfo

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public final CallingAppInfo getCallingAppInfo()
```

### getCandidateQueryData

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public final @NonNull Bundle getCandidateQueryData()
```

### getType

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public final @NonNull String getType()
```