ProviderSignInMethod

@RequiresCarApi(value = 2)
public final class ProviderSignInMethod implements SignInTemplate.SignInMethod


A SignInTemplate.SignInMethod that allows the user to initiate sign-in with a authentication provider.

Not all providers will be available on all devices. It is the developer's responsibility to verify the presence of the corresponding provider by using the provider's own APIs. For example, for Google Sign In, check Integrating Google Sign-In into Your Android App).

Summary

Public constructors

Creates a ProviderSignInMethod instance with the given provider Action.

Public methods

boolean
equals(Object other)
@NonNull Action

Returns the Action the user can use to initiate the sign-in with a given provider.

int
@NonNull String

Public constructors

ProviderSignInMethod

Added in 1.1.0
public ProviderSignInMethod(@NonNull Action action)

Creates a ProviderSignInMethod instance with the given provider Action.

Requirements The provider action must not be a standard action, and it must use a androidx.car.app.model.ParkedOnlyOnClickListener.

The action's title color can be customized with ForegroundCarColorSpan instances, any other spans will be ignored by the host.

Throws
java.lang.IllegalArgumentException

if action does not meet the requirements

java.lang.NullPointerException

if action is null

Public methods

equals

Added in 1.4.0-rc02
public boolean equals(Object other)

getAction

Added in 1.0.0
public @NonNull Action getAction()

Returns the Action the user can use to initiate the sign-in with a given provider.

hashCode

Added in 1.4.0-rc02
public int hashCode()

toString

Added in 1.4.0-rc02
public @NonNull String toString()