code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
@NonNull public GoogleBuilder setSignInOptions(@NonNull GoogleSignInOptions options) { Preconditions.checkUnset(getParams(), "Cannot overwrite previously set sign-in options.", ExtraConstants.GOOGLE_SIGN_IN_OPTIONS); GoogleSign...
Set the {@link GoogleSignInOptions} to be used for Google sign-in. Standard options like requesting the user's email will automatically be added. @param options sign-in options
setSignInOptions
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull @Override public IdpConfig build() { if (!getParams().containsKey(ExtraConstants.GOOGLE_SIGN_IN_OPTIONS)) { validateWebClientId(); setScopes(Collections.emptyList()); } return super.build(); ...
Set the {@link GoogleSignInOptions} to be used for Google sign-in. Standard options like requesting the user's email will automatically be added. @param options sign-in options
build
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public FacebookBuilder setPermissions(@NonNull List<String> permissions) { getParams().putStringArrayList( ExtraConstants.FACEBOOK_PERMISSIONS, new ArrayList<>(permissions)); return this; }
Specifies the additional permissions that the application will request in the Facebook Login SDK. Available permissions can be found <a href="https://developers.facebook.com/docs/facebook-login/permissions">here</a>.
setPermissions
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@Deprecated @NonNull public GitHubBuilder setPermissions(@NonNull List<String> permissions) { setScopes(permissions); return this; }
Specifies the additional permissions to be requested. <p> Available permissions can be found <ahref="https://developer.github.com/apps/building-oauth-apps/scopes-for-oauth-apps/#available-scopes">here</a>. @deprecated Please use {@link #setScopes(List)} instead.
setPermissions
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public GenericOAuthProviderBuilder setScopes(@NonNull List<String> scopes) { getParams().putStringArrayList( ExtraConstants.GENERIC_OAUTH_SCOPES, new ArrayList<>(scopes)); return this; }
{@link IdpConfig} builder for a Generic OAuth provider.
setScopes
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public GenericOAuthProviderBuilder setCustomParameters( @NonNull Map<String, String> customParameters) { getParams().putSerializable( ExtraConstants.GENERIC_OAUTH_CUSTOM_PARAMETERS, new HashMap<>(customParameters));...
{@link IdpConfig} builder for a Generic OAuth provider.
setCustomParameters
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setTheme(@StyleRes int theme) { mTheme = Preconditions.checkValidStyle( mApp.getApplicationContext(), theme, "theme identifier is unknown or not a style definition"); return (T) this; }
Specifies the theme to use for the application flow. If no theme is specified, a default theme will be used.
setTheme
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setLogo(@DrawableRes int logo) { mLogo = logo; return (T) this; }
Specifies the logo to use for the {@link AuthMethodPickerActivity}. If no logo is specified, none will be used.
setLogo
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull @Deprecated public T setTosUrl(@Nullable String tosUrl) { mTosUrl = tosUrl; return (T) this; }
Specifies the terms-of-service URL for the application. @deprecated Please use {@link #setTosAndPrivacyPolicyUrls(String, String)} For the Tos link to be displayed a Privacy Policy url must also be provided.
setTosUrl
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull @Deprecated public T setPrivacyPolicyUrl(@Nullable String privacyPolicyUrl) { mPrivacyPolicyUrl = privacyPolicyUrl; return (T) this; }
Specifies the privacy policy URL for the application. @deprecated Please use {@link #setTosAndPrivacyPolicyUrls(String, String)} For the Privacy Policy link to be displayed a Tos url must also be provided.
setPrivacyPolicyUrl
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setTosAndPrivacyPolicyUrls(@NonNull String tosUrl, @NonNull String privacyPolicyUrl) { Preconditions.checkNotNull(tosUrl, "tosUrl cannot be null"); Preconditions.checkNotNull(privacyPolicyUrl, "privacyPolicyUrl cannot be null"...
Specifies the privacy policy URL for the application. @deprecated Please use {@link #setTosAndPrivacyPolicyUrls(String, String)} For the Privacy Policy link to be displayed a Tos url must also be provided.
setTosAndPrivacyPolicyUrls
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setAvailableProviders(@NonNull List<IdpConfig> idpConfigs) { Preconditions.checkNotNull(idpConfigs, "idpConfigs cannot be null"); if (idpConfigs.size() == 1 && idpConfigs.get(0).getProviderId().equals(ANONYMOUS_PROVIDER)) { throw new ...
Specifies the set of supported authentication providers. At least one provider must be specified. There may only be one instance of each provider. Anonymous provider cannot be the only provider specified. <p> <p>If no providers are explicitly specified by calling this method, then the email provider is the default supp...
setAvailableProviders
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setDefaultProvider(@Nullable IdpConfig config) { if (config != null) { if (!mProviders.contains(config)) { throw new IllegalStateException( "Default provider not in available providers list."); } ...
Specifies the default authentication provider, bypassing the provider selection screen. The provider here must already be included via {@link #setAvailableProviders(List)}, and this method is incompatible with {@link #setAlwaysShowSignInMethodScreen(boolean)}. @param config the default {@link IdpConfig} to use.
setDefaultProvider
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setCredentialManagerEnabled(boolean enableCredentials) { mEnableCredentials = enableCredentials; return (T) this; }
Enables or disables the use of Credential Manager for Passwords credential selector <p> <p>Is enabled by default. @param enableCredentials enables credential selector before signup
setCredentialManagerEnabled
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setAuthMethodPickerLayout(@NonNull AuthMethodPickerLayout authMethodPickerLayout) { mAuthMethodPickerLayout = authMethodPickerLayout; return (T) this; }
Set a custom layout for the AuthMethodPickerActivity screen. See {@link AuthMethodPickerLayout}. @param authMethodPickerLayout custom layout descriptor object.
setAuthMethodPickerLayout
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setAlwaysShowSignInMethodScreen(boolean alwaysShow) { if (alwaysShow && mDefaultProvider != null) { throw new IllegalStateException( "Can't show provider choice with a default provider."); } mAlwaysShowProviderChoice =...
Forces the sign-in method choice screen to always show, even if there is only a single provider configured. <p> <p>This is false by default. @param alwaysShow if true, force the sign-in choice screen to show.
setAlwaysShowSignInMethodScreen
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setLockOrientation(boolean lockOrientation) { mLockOrientation = lockOrientation; return (T) this; }
Enable or disables the orientation for small devices to be locked in Portrait orientation <p> <p>This is false by default. @param lockOrientation if true, force the activities to be in Portrait orientation.
setLockOrientation
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public T setResetPasswordSettings(ActionCodeSettings passwordSettings) { mPasswordSettings = passwordSettings; return (T) this; }
Set custom settings for the RecoverPasswordActivity. @param passwordSettings to allow additional state via a continue URL.
setResetPasswordSettings
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@CallSuper @NonNull public Intent build() { if (mProviders.isEmpty()) { mProviders.add(new IdpConfig.EmailBuilder().build()); } return KickoffActivity.createIntent(mApp.getApplicationContext(), getFlowParams()); }
Set custom settings for the RecoverPasswordActivity. @param passwordSettings to allow additional state via a continue URL.
build
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public SignInIntentBuilder setEmailLink(@NonNull final String emailLink) { mEmailLink = emailLink; return this; }
Specifies the email link to be used for sign in. When set, a sign in attempt will be made immediately.
setEmailLink
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull public SignInIntentBuilder enableAnonymousUsersAutoUpgrade() { mEnableAnonymousUpgrade = true; validateEmailBuilderConfig(); return this; }
Enables upgrading anonymous accounts to full accounts during the sign-in flow. This is disabled by default. @throws IllegalStateException when you attempt to enable anonymous user upgrade without forcing the same device flow for email link sign in.
enableAnonymousUsersAutoUpgrade
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
private void validateEmailBuilderConfig() { for (int i = 0; i < mProviders.size(); i++) { IdpConfig config = mProviders.get(i); if (config.getProviderId().equals(EMAIL_LINK_PROVIDER)) { boolean emailLinkForceSameDevice = config....
Enables upgrading anonymous accounts to full accounts during the sign-in flow. This is disabled by default. @throws IllegalStateException when you attempt to enable anonymous user upgrade without forcing the same device flow for email link sign in.
validateEmailBuilderConfig
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@Override protected FlowParameters getFlowParams() { return new FlowParameters( mApp.getName(), mProviders, mDefaultProvider, mTheme, mLogo, mTosUrl, mPrivacyPo...
Enables upgrading anonymous accounts to full accounts during the sign-in flow. This is disabled by default. @throws IllegalStateException when you attempt to enable anonymous user upgrade without forcing the same device flow for email link sign in.
getFlowParams
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/AuthUI.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Apache-2.0
@NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public static String toFriendlyMessage(@Code int code) { switch (code) { case UNKNOWN_ERROR: return "Unknown error"; case NO_NETWORK: return "No internet connection"; case PLAY_SERVIC...
Recoverable error occurred during the Generic IDP flow.
toFriendlyMessage
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ErrorCodes.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ErrorCodes.java
Apache-2.0
@NonNull @Override public Intent createIntent(@NonNull Context context, Intent input) { return input; }
A {@link ActivityResultContract} describing that the caller can launch authentication flow with a {@link Intent} and is guaranteed to receive a {@link FirebaseAuthUIAuthenticationResult} as result. The given input intent <b>must</b> be created using a {@link com.firebase.ui.auth.AuthUI.SignInIntentBuilder} in order to ...
createIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/FirebaseAuthUIActivityResultContract.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/FirebaseAuthUIActivityResultContract.java
Apache-2.0
@Override @NonNull public FirebaseAuthUIAuthenticationResult parseResult(int resultCode, @Nullable Intent intent) { return new FirebaseAuthUIAuthenticationResult(resultCode, IdpResponse.fromResultIntent(intent)); }
A {@link ActivityResultContract} describing that the caller can launch authentication flow with a {@link Intent} and is guaranteed to receive a {@link FirebaseAuthUIAuthenticationResult} as result. The given input intent <b>must</b> be created using a {@link com.firebase.ui.auth.AuthUI.SignInIntentBuilder} in order to ...
parseResult
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/FirebaseAuthUIActivityResultContract.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/FirebaseAuthUIActivityResultContract.java
Apache-2.0
@ErrorCodes.Code public final int getErrorCode() { return mErrorCode; }
@return error code associated with this exception @see com.firebase.ui.auth.ErrorCodes
getErrorCode
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/FirebaseUiException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/FirebaseUiException.java
Apache-2.0
@NonNull public String getProviderId() { return mProviderId; }
Internal exception which holds the necessary data to complete sign-in in the event of a recoverable error.
getProviderId
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/FirebaseUiUserCollisionException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/FirebaseUiUserCollisionException.java
Apache-2.0
@NonNull public String getEmail() { return mEmail; }
Internal exception which holds the necessary data to complete sign-in in the event of a recoverable error.
getEmail
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/FirebaseUiUserCollisionException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/FirebaseUiUserCollisionException.java
Apache-2.0
@NonNull public AuthCredential getCredential() { return mCredential; }
Internal exception which holds the necessary data to complete sign-in in the event of a recoverable error.
getCredential
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/FirebaseUiUserCollisionException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/FirebaseUiUserCollisionException.java
Apache-2.0
@ErrorCodes.Code public final int getErrorCode() { return mErrorCode; }
@return error code associated with this exception @see ErrorCodes
getErrorCode
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/FirebaseUiUserCollisionException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/FirebaseUiUserCollisionException.java
Apache-2.0
@Override public IdpResponse createFromParcel(Parcel in) { return new IdpResponse( in.readParcelable(User.class.getClassLoader()), in.readString(), in.readString(), in.readInt() == 1, (FirebaseUiExcep...
A container that encapsulates the result of authenticating with an Identity Provider.
createFromParcel
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Override public IdpResponse[] newArray(int size) { return new IdpResponse[size]; }
A container that encapsulates the result of authenticating with an Identity Provider.
newArray
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public static IdpResponse fromResultIntent(@Nullable Intent resultIntent) { if (resultIntent != null) { return resultIntent.getParcelableExtra(ExtraConstants.IDP_RESPONSE); } else { return null; } }
Extract the {@link IdpResponse} from the flow's result intent. @param resultIntent The intent which {@code onActivityResult} was called with. @return The IdpResponse containing the token(s) from signing in with the Idp
fromResultIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public static IdpResponse from(@NonNull Exception e) { if (e instanceof FirebaseUiException) { return new IdpResponse((FirebaseUiException) e); } else if (e instanceof FirebaseAuthAnonymousUpgradeException) { return ((F...
Extract the {@link IdpResponse} from the flow's result intent. @param resultIntent The intent which {@code onActivityResult} was called with. @return The IdpResponse containing the token(s) from signing in with the Idp
from
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public static Intent getErrorIntent(@NonNull Exception e) { return from(e).toIntent(); }
Extract the {@link IdpResponse} from the flow's result intent. @param resultIntent The intent which {@code onActivityResult} was called with. @return The IdpResponse containing the token(s) from signing in with the Idp
getErrorIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public IdpResponse withResult(AuthResult result) { return mutate().setNewUser(result.getAdditionalUserInfo().isNewUser()).build(); }
Extract the {@link IdpResponse} from the flow's result intent. @param resultIntent The intent which {@code onActivityResult} was called with. @return The IdpResponse containing the token(s) from signing in with the Idp
withResult
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public Intent toIntent() { return new Intent().putExtra(ExtraConstants.IDP_RESPONSE, this); }
Extract the {@link IdpResponse} from the flow's result intent. @param resultIntent The intent which {@code onActivityResult} was called with. @return The IdpResponse containing the token(s) from signing in with the Idp
toIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public Builder mutate() { if (!isSuccessful()) { throw new IllegalStateException("Cannot mutate an unsuccessful response."); } return new Builder(this); }
Extract the {@link IdpResponse} from the flow's result intent. @param resultIntent The intent which {@code onActivityResult} was called with. @return The IdpResponse containing the token(s) from signing in with the Idp
mutate
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public boolean isSuccessful() { return mException == null; }
Extract the {@link IdpResponse} from the flow's result intent. @param resultIntent The intent which {@code onActivityResult} was called with. @return The IdpResponse containing the token(s) from signing in with the Idp
isSuccessful
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public User getUser() { return mUser; }
Extract the {@link IdpResponse} from the flow's result intent. @param resultIntent The intent which {@code onActivityResult} was called with. @return The IdpResponse containing the token(s) from signing in with the Idp
getUser
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public String getProviderType() { return mUser != null ? mUser.getProviderId() : null; }
Get the type of provider. e.g. {@link GoogleAuthProvider#PROVIDER_ID}
getProviderType
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
public boolean isNewUser() { return mIsNewUser; }
Returns true if this user has just signed up, false otherwise.
isNewUser
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public String getEmail() { return mUser != null ? mUser.getEmail() : null; }
Get the email used to sign in.
getEmail
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public String getPhoneNumber() { return mUser != null ? mUser.getPhoneNumber() : null; }
Get the phone number used to sign in.
getPhoneNumber
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public String getIdpToken() { return mToken; }
Get the token received as a result of logging in with the specified IDP
getIdpToken
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public String getIdpSecret() { return mSecret; }
Twitter only. Return the token secret received as a result of logging in with Twitter.
getIdpSecret
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public FirebaseUiException getError() { return mException; }
Get the error for a failed sign in.
getError
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public AuthCredential getCredentialForLinking() { return mPendingCredential; }
Get the error for a failed sign in.
getCredentialForLinking
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public boolean hasCredentialForLinking() { return mPendingCredential != null; }
Get the error for a failed sign in.
hasCredentialForLinking
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
public boolean isRecoverableErrorResponse() { // In a recoverable error flow, both a valid credential that can be used to sign-in and // the email keying that account is returned. return mPendingCredential != null || getEmail() != null; }
Get the error for a failed sign in.
isRecoverableErrorResponse
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Override public int describeContents() { return 0; }
Get the error for a failed sign in.
describeContents
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(mUser, flags); dest.writeString(mToken); dest.writeString(mSecret); dest.writeInt(mIsNewUser ? 1 : 0); ObjectOutputStream oos = null; try { oos = new ObjectOutputStream(new...
Get the error for a failed sign in.
writeToParcel
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IdpResponse response = (IdpResponse) o; return (mUser == null ? response.mUser == null : mUser.equals(response.mUser)) && (mToken == nu...
Get the error for a failed sign in.
equals
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Override public int hashCode() { int result = mUser == null ? 0 : mUser.hashCode(); result = 31 * result + (mToken == null ? 0 : mToken.hashCode()); result = 31 * result + (mSecret == null ? 0 : mSecret.hashCode()); result = 31 * result + (mIsNewUser ? 1 : 0); result = 31 * ...
Get the error for a failed sign in.
hashCode
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Override public String toString() { return "IdpResponse{" + "mUser=" + mUser + ", mToken='" + mToken + '\'' + ", mSecret='" + mSecret + '\'' + ", mIsNewUser='" + mIsNewUser + '\'' + ", mException=" + mException + ...
Get the error for a failed sign in.
toString
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
public Builder setNewUser(boolean newUser) { mIsNewUser = newUser; return this; }
Get the error for a failed sign in.
setNewUser
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
public Builder setToken(String token) { mToken = token; return this; }
Get the error for a failed sign in.
setToken
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
public Builder setSecret(String secret) { mSecret = secret; return this; }
Get the error for a failed sign in.
setSecret
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
public Builder setPendingCredential(AuthCredential credential) { mPendingCredential = credential; return this; }
Get the error for a failed sign in.
setPendingCredential
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
public IdpResponse build() { if (mPendingCredential != null && mUser == null) { return new IdpResponse(mPendingCredential, new FirebaseUiException(ErrorCodes .ANONYMOUS_UPGRADE_MERGE_CONFLICT)); } String providerId = mUser.getProviderId(); ...
Get the error for a failed sign in.
build
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/IdpResponse.java
Apache-2.0
@Nullable public IdpResponse getIdpResponse() { return idpResponse; }
The contained {@link IdpResponse} returned from the Firebase library
getIdpResponse
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/FirebaseAuthUIAuthenticationResult.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/FirebaseAuthUIAuthenticationResult.java
Apache-2.0
@NonNull public Integer getResultCode() { return resultCode; }
The result code of the received activity result @see android.app.Activity.RESULT_CANCELED @see android.app.Activity.RESULT_OK
getResultCode
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/FirebaseAuthUIAuthenticationResult.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/FirebaseAuthUIAuthenticationResult.java
Apache-2.0
@Override public int hashCode() { int result = idpResponse == null ? 0 : idpResponse.hashCode(); result = 31 * result + resultCode.hashCode(); return result; }
The result code of the received activity result @see android.app.Activity.RESULT_CANCELED @see android.app.Activity.RESULT_OK
hashCode
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/FirebaseAuthUIAuthenticationResult.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/FirebaseAuthUIAuthenticationResult.java
Apache-2.0
@Override public String toString() { return "FirebaseAuthUIAuthenticationResult{" + "idpResponse=" + idpResponse + ", resultCode='" + resultCode + '}'; }
The result code of the received activity result @see android.app.Activity.RESULT_CANCELED @see android.app.Activity.RESULT_OK
toString
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/FirebaseAuthUIAuthenticationResult.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/FirebaseAuthUIAuthenticationResult.java
Apache-2.0
@Override public FlowParameters createFromParcel(Parcel in) { String appName = in.readString(); List<IdpConfig> providerInfo = in.createTypedArrayList(IdpConfig.CREATOR); IdpConfig defaultProvider = in.readParcelable(IdpConfig.class.getClassLoader()); int themeId ...
Encapsulates the core parameters and data captured during the authentication flow, in a serializable manner, in order to pass data between activities.
createFromParcel
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/FlowParameters.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/FlowParameters.java
Apache-2.0
@Override public FlowParameters[] newArray(int size) { return new FlowParameters[size]; }
Encapsulates the core parameters and data captured during the authentication flow, in a serializable manner, in order to pass data between activities.
newArray
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/FlowParameters.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/FlowParameters.java
Apache-2.0
public PendingIntent getPendingIntent() { return mPendingIntent; }
Returns the PendingIntent, if available. @return The PendingIntent or null if not available.
getPendingIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/PendingIntentRequiredException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/PendingIntentRequiredException.java
Apache-2.0
public IntentSender getIntentSender() { return mIntentSender; }
Returns the IntentSender, if available. @return The IntentSender or null if not available.
getIntentSender
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/PendingIntentRequiredException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/PendingIntentRequiredException.java
Apache-2.0
public int getRequestCode() { return mRequestCode; }
Returns the IntentSender, if available. @return The IntentSender or null if not available.
getRequestCode
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/PendingIntentRequiredException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/PendingIntentRequiredException.java
Apache-2.0
public static PhoneNumber emptyPhone() { return EMPTY_PHONE_NUMBER; }
Returns an empty instance of this class
emptyPhone
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumber.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumber.java
Apache-2.0
public static boolean isValid(PhoneNumber phoneNumber) { return phoneNumber != null && !EMPTY_PHONE_NUMBER.equals(phoneNumber) && !TextUtils.isEmpty(phoneNumber.getPhoneNumber()) && !TextUtils.isEmpty(phoneNumber.getCountryCode()) && !TextUtils.isE...
Returns an empty instance of this class
isValid
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumber.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumber.java
Apache-2.0
public static boolean isCountryValid(PhoneNumber phoneNumber) { return phoneNumber != null && !EMPTY_PHONE_NUMBER.equals(phoneNumber) && !TextUtils.isEmpty(phoneNumber.getCountryCode()) && !TextUtils.isEmpty(phoneNumber.getCountryIso()); }
Returns an empty instance of this class
isCountryValid
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumber.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumber.java
Apache-2.0
public String getPhoneNumber() { return mPhoneNumber; }
Returns phone number without country code
getPhoneNumber
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumber.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumber.java
Apache-2.0
@NonNull public String getPhoneNumber() { return mPhoneNumber; }
@return the phone number requiring verification
getPhoneNumber
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumberVerificationRequiredException.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/PhoneNumberVerificationRequiredException.java
Apache-2.0
@NonNull public static <T> Resource<T> forFailure(@NonNull Exception e) { return new Resource<>(State.FAILURE, null, e); }
Creates a failed resource with an exception.
forFailure
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
@NonNull public static <T> Resource<T> forLoading() { return new Resource<>(State.LOADING, null, null); }
Creates a resource in the loading state, without a value or an exception.
forLoading
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
@NonNull public State getState() { return mState; }
Creates a resource in the loading state, without a value or an exception.
getState
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
@Nullable public final Exception getException() { mIsUsed = true; return mException; }
Creates a resource in the loading state, without a value or an exception.
getException
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
@Nullable public T getValue() { mIsUsed = true; return mValue; }
Creates a resource in the loading state, without a value or an exception.
getValue
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
public boolean isUsed() { return mIsUsed; }
Creates a resource in the loading state, without a value or an exception.
isUsed
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Resource<?> resource = (Resource<?>) o; return mState == resource.mState && (mValue == null ? resource.mValue == null : mValue.equals(r...
Creates a resource in the loading state, without a value or an exception.
equals
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
@Override public int hashCode() { int result = mState.hashCode(); result = 31 * result + (mValue == null ? 0 : mValue.hashCode()); result = 31 * result + (mException == null ? 0 : mException.hashCode()); return result; }
Creates a resource in the loading state, without a value or an exception.
hashCode
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
@Override public String toString() { return "Resource{" + "mState=" + mState + ", mValue=" + mValue + ", mException=" + mException + '}'; }
Creates a resource in the loading state, without a value or an exception.
toString
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/model/Resource.java
Apache-2.0
@Override public Task<AuthResult> then(@NonNull Task<AuthResult> task) { final AuthResult authResult = task.getResult(); FirebaseUser firebaseUser = authResult.getUser(); String name = firebaseUser.getDisplayName(); Uri photoUri = firebaseUser.getPhotoUrl(); if (!TextUtils.i...
Merges an existing account's profile with the new user's profile. <p> <b>Note:</b> This operation always returns a successful task to minimize login interruptions.
then
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/data/remote/ProfileMerger.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/data/remote/ProfileMerger.java
Apache-2.0
public void startSaveCredentials( FirebaseUser firebaseUser, IdpResponse response, @Nullable String password) { // Extract email; if null, fallback to the phone number. String email = firebaseUser.getEmail(); if (email == null) { email = firebaseUs...
Starts the CredentialManager save flow. <p>Instead of building a SmartLock {@link com.google.android.gms.auth.api.credentials.Credential}, we now extract the user's email (or phone number as a fallback) and pass it along with the password and response.</p> @param firebaseUser the currently signed-in user. @param resp...
startSaveCredentials
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/HelperActivityBase.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/HelperActivityBase.java
Apache-2.0
protected boolean isOffline() { ConnectivityManager manager = (ConnectivityManager) getApplicationContext() .getSystemService(Context.CONNECTIVITY_SERVICE); return !(manager != null && manager.getActiveNetworkInfo() != null && manager.getActiveNetworkInfo...
Check if there is an active or soon-to-be-active network connection. @return true if there is no network connection, false otherwise.
isOffline
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/HelperActivityBase.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/HelperActivityBase.java
Apache-2.0
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fui_activity_invisible); // Create an indeterminate, circular progress bar in the app's theme mProgressBar = new CircularProgressIndicator(new Context...
Base classes for activities that are just simple overlays.
onCreate
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
Apache-2.0
@Override public void showProgress(int message) { if (mProgressBar.getVisibility() == View.VISIBLE) { mHandler.removeCallbacksAndMessages(null); return; } mLastShownTime = System.currentTimeMillis(); mProgressBar.setVisibility(View.VISIBLE); }
Base classes for activities that are just simple overlays.
showProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
Apache-2.0
@Override public void hideProgress() { doAfterTimeout(() -> { mLastShownTime = 0; mProgressBar.setVisibility(View.GONE); }); }
Base classes for activities that are just simple overlays.
hideProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
Apache-2.0
@Override public void finish(int resultCode, @Nullable Intent intent) { setResult(resultCode, intent); doAfterTimeout(() -> finish()); }
Base classes for activities that are just simple overlays.
finish
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
Apache-2.0
private void doAfterTimeout(Runnable runnable) { long currentTime = System.currentTimeMillis(); long diff = currentTime - mLastShownTime; // 'diff' is how long it's been since we showed the spinner, so in the // case where diff is greater than our minimum spinner duration then our ...
For certain actions (like finishing or hiding the progress dialog) we want to make sure that we have shown the progress state for at least MIN_SPINNER_MS to prevent flickering. This method performs some action after the window has passed, or immediately if we have already waited longer than that.
doAfterTimeout
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/InvisibleActivityBase.java
Apache-2.0
protected void doAfterTimeout(Runnable runnable) { long currentTime = System.currentTimeMillis(); long diff = currentTime - mLastShownTime; // 'diff' is how long it's been since we showed the spinner, so in the // case where diff is greater than our minimum spinner duration then our ...
For certain actions (like finishing or hiding the progress dialog) we want to make sure that we have shown the progress state for at least MIN_SPINNER_MS to prevent flickering. <p> This method performs some action after the window has passed, or immediately if we have already waited longer than that.
doAfterTimeout
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/InvisibleFragmentBase.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/InvisibleFragmentBase.java
Apache-2.0
public static CheckEmailFragment newInstance(@Nullable String email) { CheckEmailFragment fragment = new CheckEmailFragment(); Bundle args = new Bundle(); args.putString(ExtraConstants.EMAIL, email); fragment.setArguments(args); return fragment; }
Fragment that shows a form with an email field and checks for existing accounts with that email. <p> Host Activities should implement {@link CheckEmailFragment.CheckEmailListener}.
newInstance
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
Apache-2.0
@Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fui_check_email_layout, container, false); }
Fragment that shows a form with an email field and checks for existing accounts with that email. <p> Host Activities should implement {@link CheckEmailFragment.CheckEmailListener}.
onCreateView
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
Apache-2.0
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mHandler = new ViewModelProvider(this).get(CheckEmailHandler.class); mHandler.init(getFlowParams()); FragmentActivity activity = getActivity(); if (!(a...
Fragment that shows a form with an email field and checks for existing accounts with that email. <p> Host Activities should implement {@link CheckEmailFragment.CheckEmailListener}.
onActivityCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
Apache-2.0
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { mHandler.onActivityResult(requestCode, resultCode, data); }
Fragment that shows a form with an email field and checks for existing accounts with that email. <p> Host Activities should implement {@link CheckEmailFragment.CheckEmailListener}.
onActivityResult
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
Apache-2.0
@Override public void onClick(View view) { int id = view.getId(); if (id == R.id.button_sign_in) { signIn(); } else if (id == R.id.button_sign_up) { signUp(); } else if (id == R.id.email_layout || id == R.id.email) { mEmailLayout.setError(null); ...
Fragment that shows a form with an email field and checks for existing accounts with that email. <p> Host Activities should implement {@link CheckEmailFragment.CheckEmailListener}.
onClick
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
Apache-2.0
private String getEmailProvider() { // Iterate through all IdpConfig entries for (AuthUI.IdpConfig config : getFlowParams().providers) { // Assuming there is a getter for the provider ID if (EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD.equals(config.getProviderId())) { ...
Fragment that shows a form with an email field and checks for existing accounts with that email. <p> Host Activities should implement {@link CheckEmailFragment.CheckEmailListener}.
getEmailProvider
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
Apache-2.0
private void signIn() { String email = mEmailEditText.getText().toString(); if (mEmailFieldValidator.validate(email)) { String provider = getEmailProvider(); User user = new User.Builder(provider, email).build(); mListener.onExistingEmailUser(user); } }
Fragment that shows a form with an email field and checks for existing accounts with that email. <p> Host Activities should implement {@link CheckEmailFragment.CheckEmailListener}.
signIn
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailFragment.java
Apache-2.0