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
private void signUp() { String email = mEmailEditText.getText().toString(); if (mEmailFieldValidator.validate(email)) { String provider = getEmailProvider(); User user = new User.Builder(provider, email).build(); mListener.onNewUser(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}.
signUp
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 showProgress(int message) { // Disable both buttons while progress is showing. mSignInButton.setEnabled(false); mSignUpButton.setEnabled(false); mProgressBar.setVisibility(View.VISIBLE); }
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}.
showProgress
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 hideProgress() { mSignInButton.setEnabled(true); mSignUpButton.setEnabled(true); mProgressBar.setVisibility(View.INVISIBLE); }
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}.
hideProgress
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
public void fetchCredential() { // Build a sign-in request that supports password-based sign in, // which will trigger the hint picker UI for email addresses. SignInClient signInClient = Identity.getSignInClient(getApplication()); BeginSignInRequest signInRequest = BeginSignInRequest.bui...
Initiates a hint picker flow using the new Identity API. This replaces the deprecated Credentials API call.
fetchCredential
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailHandler.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailHandler.java
Apache-2.0
public void fetchProvider(final String email) { setResult(Resource.forLoading()); ProviderUtils.fetchTopProvider(getAuth(), getArguments(), email) .addOnCompleteListener(task -> { if (task.isSuccessful()) { setResult(Resource.forSuccess( ...
Fetches the top provider for the given email.
fetchProvider
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailHandler.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailHandler.java
Apache-2.0
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { if (requestCode != RequestCodes.CRED_HINT || resultCode != Activity.RESULT_OK) { return; } setResult(Resource.forLoading()); SignInClient signInClient = Identity.getSignInClient(getApplica...
Handles the result from the hint picker launched via the new Identity API.
onActivityResult
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailHandler.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/CheckEmailHandler.java
Apache-2.0
public static Intent createIntent(Context context, FlowParameters flowParams) { return createBaseIntent(context, EmailActivity.class, flowParams); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
createIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
public static Intent createIntent(Context context, FlowParameters flowParams, String email) { return createBaseIntent(context, EmailActivity.class, flowParams) .putExtra(ExtraConstants.EMAIL, email); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
createIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
public static Intent createIntentForLinking(Context context, FlowParameters flowParams, IdpResponse responseForLinking) { return createIntent(context, flowParams, responseForLinking.getEmail()) .putExtra(ExtraConstants.IDP_RESPONSE, responseForLink...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
createIntentForLinking
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fui_activity_register_email); if (savedInstanceState != null) { return; } // Get email from intent (can be null) String e...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onCreate
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == RequestCodes.WELCOME_BACK_EMAIL_FLOW || requestCode == RequestCodes.WELCOME_BACK_IDP_FLOW) { finish(resultCo...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onActivityResult
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void onExistingEmailUser(User user) { if (user.getProviderId().equals(EMAIL_LINK_PROVIDER)) { AuthUI.IdpConfig emailConfig = ProviderUtils.getConfigFromIdpsOrThrow( getFlowParams().providers, EMAIL_LINK_PROVIDER); showRegisterEmailLinkFragment( ...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onExistingEmailUser
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void onExistingIdpUser(User user) { // Existing social user, direct them to sign in using their chosen provider. startActivityForResult( WelcomeBackIdpPrompt.createIntent(this, getFlowParams(), user), RequestCodes.WELCOME_BACK_IDP_FLOW); setSl...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onExistingIdpUser
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void onNewUser(User user) { // New user, direct them to create an account with email/password // if account creation is enabled in SignInIntentBuilder TextInputLayout emailLayout = findViewById(R.id.email_layout); AuthUI.IdpConfig emailConfig = ProviderUtils.getConf...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onNewUser
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void onTroubleSigningIn(String email) { TroubleSigningInFragment troubleSigningInFragment = TroubleSigningInFragment.newInstance (email); switchFragment(troubleSigningInFragment, R.id.fragment_register_email, TroubleSigningInFragment.TAG, true, true);...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onTroubleSigningIn
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void onClickResendEmail(String email) { if (getSupportFragmentManager().getBackStackEntryCount() > 0) { // We're assuming that to get to the TroubleSigningInFragment, we went through // the EmailLinkFragment, which was added to the fragment back stack. //...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onClickResendEmail
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void onSendEmailFailure(Exception e) { finishOnDeveloperError(e); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onSendEmailFailure
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void onDeveloperFailure(Exception e) { finishOnDeveloperError(e); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onDeveloperFailure
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
private void finishOnDeveloperError(Exception e) { finish(RESULT_CANCELED, IdpResponse.getErrorIntent(new FirebaseUiException( ErrorCodes.DEVELOPER_ERROR, e.getMessage()))); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
finishOnDeveloperError
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
private void setSlideAnimation() { // Make the next activity slide in overridePendingTransition(R.anim.fui_slide_in_right, R.anim.fui_slide_out_left); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
setSlideAnimation
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
private void showRegisterEmailLinkFragment(AuthUI.IdpConfig emailConfig, String email) { ActionCodeSettings actionCodeSettings = emailConfig.getParams().getParcelable (ExtraConstants.ACTION_CODE_SETTINGS); EmailLinkFragment fragment = EmailL...
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
showRegisterEmailLinkFragment
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void showProgress(@StringRes int message) { throw new UnsupportedOperationException("Email fragments must handle progress updates."); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
showProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void hideProgress() { throw new UnsupportedOperationException("Email fragments must handle progress updates."); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
hideProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
@Override public void onMergeFailure(IdpResponse response) { finish(ErrorCodes.ANONYMOUS_UPGRADE_MERGE_CONFLICT, response.toIntent()); }
Activity to control the entire email sign up flow. Plays host to {@link CheckEmailFragment} and {@link RegisterEmailFragment} and triggers {@link WelcomeBackPasswordPrompt} and {@link WelcomeBackIdpPrompt}.
onMergeFailure
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailActivity.java
Apache-2.0
private void startErrorRecoveryFlow(int flow) { if (flow != RequestCodes.EMAIL_LINK_CROSS_DEVICE_LINKING_FLOW && flow != RequestCodes.EMAIL_LINK_PROMPT_FOR_EMAIL_FLOW) { throw new IllegalStateException("Invalid flow param. It must be either " + "RequestCodes.EMAIL...
@param flow must be one of RequestCodes.EMAIL_LINK_PROMPT_FOR_EMAIL_FLOW or RequestCodes.EMAIL_LINK_CROSS_DEVICE_LINKING_FLOW
startErrorRecoveryFlow
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java
Apache-2.0
private AlertDialog buildAlertDialog(final int errorCode) { AlertDialog.Builder alertDialog = new AlertDialog.Builder(this); String titleText; String messageText; if (errorCode == ErrorCodes.EMAIL_LINK_DIFFERENT_ANONYMOUS_USER_ERROR) { titleText = getString(R.string.fui_emai...
@param flow must be one of RequestCodes.EMAIL_LINK_PROMPT_FOR_EMAIL_FLOW or RequestCodes.EMAIL_LINK_CROSS_DEVICE_LINKING_FLOW
buildAlertDialog
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java
Apache-2.0
@Override public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == RequestCodes.EMAIL_LINK_PROMPT_FOR_EMAIL_FLOW || requestCode == RequestCodes.EMAIL_LINK_CROSS_DEVICE_LINKING_FLOW...
@param flow must be one of RequestCodes.EMAIL_LINK_PROMPT_FOR_EMAIL_FLOW or RequestCodes.EMAIL_LINK_CROSS_DEVICE_LINKING_FLOW
onActivityResult
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCatcherActivity.java
Apache-2.0
public static EmailLinkCrossDeviceLinkingFragment newInstance() { EmailLinkCrossDeviceLinkingFragment fragment = new EmailLinkCrossDeviceLinkingFragment(); return fragment; }
Fragment that tells the user that a linking flow cannot be completed as they have opened the email link on a different device.
newInstance
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
Apache-2.0
@Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fui_email_link_cross_device_linking, container, false); }
Fragment that tells the user that a linking flow cannot be completed as they have opened the email link on a different device.
onCreateView
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
Apache-2.0
@SuppressWarnings("WrongConstant") @Override @SuppressLint("WrongConstant") public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { mProgressBar = view.findViewById(R.id.top_progress_bar); mContinueButton = view.findViewById(R.id.button_continue); mContin...
Fragment that tells the user that a linking flow cannot be completed as they have opened the email link on a different device.
onViewCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
Apache-2.0
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); FragmentActivity activity = getActivity(); if (!(activity instanceof FinishEmailLinkSignInListener)) { throw new IllegalStateException("Activity must imple...
Fragment that tells the user that a linking flow cannot be completed as they have opened the email link on a different device.
onActivityCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
Apache-2.0
@Override public void onClick(View view) { int id = view.getId(); if (id == R.id.button_continue) { mListener.completeCrossDeviceEmailLinkFlow(); } }
Fragment that tells the user that a linking flow cannot be completed as they have opened the email link on a different device.
onClick
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
Apache-2.0
@Override public void showProgress(int message) { mProgressBar.setVisibility(View.VISIBLE); }
Fragment that tells the user that a linking flow cannot be completed as they have opened the email link on a different device.
showProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
Apache-2.0
@Override public void hideProgress() { mProgressBar.setVisibility(View.INVISIBLE); }
Fragment that tells the user that a linking flow cannot be completed as they have opened the email link on a different device.
hideProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkCrossDeviceLinkingFragment.java
Apache-2.0
public static Intent createIntent(Context context, FlowParameters flowParams, int flow) { return createBaseIntent(context, EmailLinkErrorRecoveryActivity.class, flowParams) .putExtra(RECOVERY_TYPE_KEY, flow); }
Handles the recovery flow for finishing the cross-device email link sign in flow. We either need the user to input their email, or we need them to determine if they want to continue the linking flow.
createIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
Apache-2.0
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fui_activity_register_email); if (savedInstanceState != null) { return; } boolean linkingFlow = getIntent().getIntExtra(RECOVERY_...
Handles the recovery flow for finishing the cross-device email link sign in flow. We either need the user to input their email, or we need them to determine if they want to continue the linking flow.
onCreate
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
Apache-2.0
@Override public void onEmailPromptSuccess(IdpResponse response) { finish(RESULT_OK, response.toIntent()); }
Handles the recovery flow for finishing the cross-device email link sign in flow. We either need the user to input their email, or we need them to determine if they want to continue the linking flow.
onEmailPromptSuccess
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
Apache-2.0
@Override public void completeCrossDeviceEmailLinkFlow() { EmailLinkPromptEmailFragment fragment = EmailLinkPromptEmailFragment.newInstance(); switchFragment(fragment, R.id.fragment_register_email, EmailLinkCrossDeviceLinkingFragment.TAG, /*withTransition=*/true, ...
Handles the recovery flow for finishing the cross-device email link sign in flow. We either need the user to input their email, or we need them to determine if they want to continue the linking flow.
completeCrossDeviceEmailLinkFlow
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
Apache-2.0
@Override public void showProgress(@StringRes int message) { throw new UnsupportedOperationException("Fragments must handle progress updates."); }
Handles the recovery flow for finishing the cross-device email link sign in flow. We either need the user to input their email, or we need them to determine if they want to continue the linking flow.
showProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
Apache-2.0
@Override public void hideProgress() { throw new UnsupportedOperationException("Fragments must handle progress updates."); }
Handles the recovery flow for finishing the cross-device email link sign in flow. We either need the user to input their email, or we need them to determine if they want to continue the linking flow.
hideProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkErrorRecoveryActivity.java
Apache-2.0
public static EmailLinkPromptEmailFragment newInstance() { EmailLinkPromptEmailFragment fragment = new EmailLinkPromptEmailFragment(); return fragment; }
Prompts the user to enter their email to finish the cross-device email link sign in flow.
newInstance
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.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); }
Prompts the user to enter their email to finish the cross-device email link sign in flow.
onCreateView
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
@Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { mNextButton = view.findViewById(R.id.button_sign_in); mSignUpButton = view.findViewById(R.id.button_sign_up); mProgressBar = view.findViewById(R.id.top_progress_bar); mNextButton.setOnClic...
Prompts the user to enter their email to finish the cross-device email link sign in flow.
onViewCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); FragmentActivity activity = getActivity(); if (!(activity instanceof EmailLinkPromptEmailListener)) { throw new IllegalStateException("Activity must implem...
Prompts the user to enter their email to finish the cross-device email link sign in flow.
onActivityCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
private void initHandler() { mHandler = new ViewModelProvider(this).get(EmailLinkSignInHandler.class); mHandler.init(getFlowParams()); mHandler.getOperation().observe(getViewLifecycleOwner(), new ResourceObserver<IdpResponse>(this) { @Override protected void onSuccess(@No...
Prompts the user to enter their email to finish the cross-device email link sign in flow.
initHandler
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
@Override protected void onSuccess(@NonNull IdpResponse response) { mListener.onEmailPromptSuccess(response); }
Prompts the user to enter their email to finish the cross-device email link sign in flow.
onSuccess
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
@Override protected void onFailure(@NonNull final Exception e) { // We've checked the oob code before starting this flow via #checkActionCode. // I don't see this failing in a non-recoverable way. mEmailLayout.setError(e.getMessage()); }
Prompts the user to enter their email to finish the cross-device email link sign in flow.
onFailure
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
private void validateEmailAndFinishSignIn() { String email = mEmailEditText.getText().toString(); if (mEmailFieldValidator.validate(email)) { mHandler.finishSignIn(email); } }
Prompts the user to enter their email to finish the cross-device email link sign in flow.
validateEmailAndFinishSignIn
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
@Override public void onClick(View view) { int id = view.getId(); if (id == R.id.button_sign_in) { validateEmailAndFinishSignIn(); } else if (id == R.id.email_layout || id == R.id.email) { mEmailLayout.setError(null); } }
Prompts the user to enter their email to finish the cross-device email link sign in flow.
onClick
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
@Override public void showProgress(int message) { mNextButton.setEnabled(false); mProgressBar.setVisibility(View.VISIBLE); }
Prompts the user to enter their email to finish the cross-device email link sign in flow.
showProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
@Override public void hideProgress() { mNextButton.setEnabled(true); mProgressBar.setVisibility(View.INVISIBLE); }
Prompts the user to enter their email to finish the cross-device email link sign in flow.
hideProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/EmailLinkPromptEmailFragment.java
Apache-2.0
public static Intent createIntent(Context context, FlowParameters params, String email) { return createBaseIntent(context, RecoverPasswordActivity.class, params) .putExtra(ExtraConstants.EMAIL, email); }
Activity to initiate the "forgot password" flow by asking for the user's email.
createIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fui_forgot_password_layout); mHandler = new ViewModelProvider(this).get(RecoverPasswordHandler.class); mHandler.init(getFlowParams()); mHandle...
Activity to initiate the "forgot password" flow by asking for the user's email.
onCreate
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
@Override protected void onSuccess(@NonNull String email) { mEmailInputLayout.setError(null); showEmailSentDialog(email); }
Activity to initiate the "forgot password" flow by asking for the user's email.
onSuccess
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
@Override protected void onFailure(@NonNull Exception e) { if (e instanceof FirebaseAuthInvalidUserException || e instanceof FirebaseAuthInvalidCredentialsException) { // No FirebaseUser exists with this email address, show error. ...
Activity to initiate the "forgot password" flow by asking for the user's email.
onFailure
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
@Override public void onClick(View view) { if (view.getId() == R.id.button_done) { onDonePressed(); } }
Activity to initiate the "forgot password" flow by asking for the user's email.
onClick
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
@Override public void onDonePressed() { if (mEmailFieldValidator.validate(mEmailEditText.getText())) { if (getFlowParams().passwordResetSettings != null) { resetPassword(mEmailEditText.getText().toString(), getFlowParams().passwordResetSettings); } else { ...
Activity to initiate the "forgot password" flow by asking for the user's email.
onDonePressed
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
private void resetPassword(String email, @Nullable ActionCodeSettings passwordResetSettings) { mHandler.startReset(email, passwordResetSettings); }
Activity to initiate the "forgot password" flow by asking for the user's email.
resetPassword
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
private void showEmailSentDialog(String email) { new MaterialAlertDialogBuilder(this) .setTitle(R.string.fui_title_confirm_recover_password) .setMessage(getString(R.string.fui_confirm_recovery_body, email)) .setOnDismissListener(dialog -> finish(RESULT_OK, new Int...
Activity to initiate the "forgot password" flow by asking for the user's email.
showEmailSentDialog
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
@Override public void showProgress(int message) { mSubmitButton.setEnabled(false); mProgressBar.setVisibility(View.VISIBLE); }
Activity to initiate the "forgot password" flow by asking for the user's email.
showProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
@Override public void hideProgress() { mSubmitButton.setEnabled(true); mProgressBar.setVisibility(View.INVISIBLE); }
Activity to initiate the "forgot password" flow by asking for the user's email.
hideProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RecoverPasswordActivity.java
Apache-2.0
public static RegisterEmailFragment newInstance(User user) { RegisterEmailFragment fragment = new RegisterEmailFragment(); Bundle args = new Bundle(); args.putParcelable(ExtraConstants.USER, user); fragment.setArguments(args); return fragment; }
Email belongs to an existing user - failed to merge anonymous user.
newInstance
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState == null) { mUser = User.getUser(getArguments()); } else { mUser = User.getUser(savedInstanceState); } mHandler = new ViewM...
Email belongs to an existing user - failed to merge anonymous user.
onCreate
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override protected void onSuccess(@NonNull IdpResponse response) { startSaveCredentials( mHandler.getCurrentUser(), response, mPasswordEditText.getText().toString()); }
Email belongs to an existing user - failed to merge anonymous user.
onSuccess
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override protected void onFailure(@NonNull Exception e) { if (e instanceof FirebaseAuthWeakPasswordException) { mPasswordInput.setError(getResources().getQuantityString( R.plurals.fui_error_weak_password, R.integer....
Email belongs to an existing user - failed to merge anonymous user.
onFailure
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fui_register_email_layout, container, false); }
Email belongs to an existing user - failed to merge anonymous user.
onCreateView
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { mNextButton = view.findViewById(R.id.button_create); mProgressBar = view.findViewById(R.id.top_progress_bar); mEmailEditText = view.findViewById(R.id.email); mNameEditText = view.findViewB...
Email belongs to an existing user - failed to merge anonymous user.
onViewCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
private void safeRequestFocus(final View v) { v.post(() -> v.requestFocus()); }
Email belongs to an existing user - failed to merge anonymous user.
safeRequestFocus
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); FragmentActivity activity = requireActivity(); activity.setTitle(R.string.fui_title_register_email); if (!(activity instanceof AnonymousUpgradeListener)) { ...
Email belongs to an existing user - failed to merge anonymous user.
onActivityCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void onSaveInstanceState(@NonNull Bundle outState) { outState.putParcelable(ExtraConstants.USER, new User.Builder(EmailAuthProvider.PROVIDER_ID, mEmailEditText.getText().toString()) .setName(mNameEditText.getText().toString()) ...
Email belongs to an existing user - failed to merge anonymous user.
onSaveInstanceState
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void onFocusChange(View view, boolean hasFocus) { if (hasFocus) return; // Only consider fields losing focus int id = view.getId(); if (id == R.id.email) { mEmailFieldValidator.validate(mEmailEditText.getText()); } else if (id == R.id.name) { ...
Email belongs to an existing user - failed to merge anonymous user.
onFocusChange
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void onClick(View view) { if (view.getId() == R.id.button_create) { validateAndRegisterUser(); } }
Email belongs to an existing user - failed to merge anonymous user.
onClick
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void onDonePressed() { validateAndRegisterUser(); }
Email belongs to an existing user - failed to merge anonymous user.
onDonePressed
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void showProgress(int message) { mNextButton.setEnabled(false); mProgressBar.setVisibility(View.VISIBLE); }
Email belongs to an existing user - failed to merge anonymous user.
showProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
@Override public void hideProgress() { mNextButton.setEnabled(true); mProgressBar.setVisibility(View.INVISIBLE); }
Email belongs to an existing user - failed to merge anonymous user.
hideProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
private void validateAndRegisterUser() { String email = mEmailEditText.getText().toString(); String password = mPasswordEditText.getText().toString(); String name = mNameEditText.getText().toString(); boolean emailValid = mEmailFieldValidator.validate(email); boolean passwordVal...
Email belongs to an existing user - failed to merge anonymous user.
validateAndRegisterUser
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailFragment.java
Apache-2.0
public static Intent createIntent( Context context, FlowParameters flowParams, IdpResponse response) { return createBaseIntent(context, WelcomeBackPasswordPrompt.class, flowParams) .putExtra(ExtraConstants.IDP_RESPONSE, response); }
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
createIntent
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fui_welcome_back_password_prompt_layout); // Show keyboard getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); ...
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
onCreate
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
@Override protected void onSuccess(@NonNull IdpResponse response) { startSaveCredentials( mHandler.getCurrentUser(), response, mHandler.getPendingPassword()); }
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
onSuccess
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
@Override protected void onFailure(@NonNull Exception e) { if (e instanceof FirebaseAuthAnonymousUpgradeException) { IdpResponse response = ((FirebaseAuthAnonymousUpgradeException) e).getResponse(); finish(ErrorCodes.ANONYMOUS_UPGRADE_MERGE_CONFLICT, r...
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
onFailure
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
@StringRes private int getErrorMessage(Exception exception) { if (exception instanceof FirebaseAuthInvalidCredentialsException) { return R.string.fui_error_invalid_password; } return R.string.fui_error_unknown; }
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
getErrorMessage
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
private void onForgotPasswordClicked() { startActivity(RecoverPasswordActivity.createIntent( this, getFlowParams(), mIdpResponse.getEmail())); }
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
onForgotPasswordClicked
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
@Override public void onDonePressed() { validateAndSignIn(); }
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
onDonePressed
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
private void validateAndSignIn(String password) { // Check for null or empty password if (TextUtils.isEmpty(password)) { mPasswordLayout.setError(getString(R.string.fui_error_invalid_password)); return; } else { mPasswordLayout.setError(null); } ...
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
validateAndSignIn
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
@Override public void onClick(View view) { final int id = view.getId(); if (id == R.id.button_done) { validateAndSignIn(); } else if (id == R.id.trouble_signing_in) { onForgotPasswordClicked(); } }
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
onClick
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
@Override public void showProgress(int message) { mDoneButton.setEnabled(false); mProgressBar.setVisibility(View.VISIBLE); }
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
showProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
@Override public void hideProgress() { mDoneButton.setEnabled(true); mProgressBar.setVisibility(View.INVISIBLE); }
Activity to link a pre-existing email/password account to a new IDP sign-in by confirming the password before initiating a link.
hideProgress
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/email/WelcomeBackPasswordPrompt.java
Apache-2.0
public void fetchCredential(final Activity activity) { GetPhoneNumberHintIntentRequest request = GetPhoneNumberHintIntentRequest.builder().build(); Identity.getSignInClient(activity) .getPhoneNumberHintIntent(request) .addOnSuccessListener(result -> { ...
Initiates the Phone Number Hint flow using the new API. <p>This method creates a GetPhoneNumberHintIntentRequest and calls Identity.getSignInClient(activity).getPhoneNumberHintIntent(request) to retrieve an IntentSender. The IntentSender is then wrapped in a PendingIntentRequiredException so that the caller can launch...
fetchCredential
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/CheckPhoneHandler.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/CheckPhoneHandler.java
Apache-2.0
public void onActivityResult(Activity activity, int requestCode, int resultCode, @Nullable Intent data) { if (requestCode != RequestCodes.CRED_HINT || resultCode != Activity.RESULT_OK) { return; } try { String phoneNumber = Identity.getSignInClient(activity).getPhoneNumbe...
Handles the result from the Phone Number Hint flow. <p>Call this method from your Activity's onActivityResult. It extracts the phone number from the returned Intent and formats it. @param activity The activity used to process the returned Intent. @param requestCode The request code (should match RequestCodes.CRED_...
onActivityResult
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/CheckPhoneHandler.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/CheckPhoneHandler.java
Apache-2.0
void initAttrs(Context context, AttributeSet attrs) { TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.SpacedEditText); // Controls the ScaleXSpan applied on the injected spaces mProportion = array.getFloat(R.styleable.SpacedEditText_spacingProportion, 1f); array.recy...
This element inserts spaces between characters in the edit text and expands the width of the spaces using spannables. This is required since Android's letter spacing is not available until API 21.
initAttrs
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
Apache-2.0
@Override public void setText(CharSequence text, BufferType type) { mOriginalText = new SpannableStringBuilder(text); super.setText(getSpacedOutString(text), BufferType.SPANNABLE); }
This element inserts spaces between characters in the edit text and expands the width of the spaces using spannables. This is required since Android's letter spacing is not available until API 21.
setText
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
Apache-2.0
@Override public void setSelection(int index) { // Desired mapping: // 0 --> 0 // 1 --> 1 // 2 --> 3 // 3 --> 5 // 4 --> 7 // 5 --> 9 // 6 --> 11 // Naive transformation int newIndex = (index * 2) - 1; // Lower bound is 0 ...
Set the selection after recalculating the index intended by the caller.
setSelection
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
Apache-2.0
private SpannableStringBuilder getSpacedOutString(CharSequence text) { SpannableStringBuilder builder = new SpannableStringBuilder(); int textLength = text.length(); int lastSpaceIndex = -1; //Insert a space in front of all characters upto the last character //Scale the space wi...
Set the selection after recalculating the index intended by the caller.
getSpacedOutString
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
Apache-2.0
public Editable getUnspacedText() { return mOriginalText; }
Set the selection after recalculating the index intended by the caller.
getUnspacedText
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SpacedEditText.java
Apache-2.0
public static SubmitConfirmationCodeFragment newInstance(String phoneNumber) { SubmitConfirmationCodeFragment fragment = new SubmitConfirmationCodeFragment(); Bundle args = new Bundle(); args.putString(ExtraConstants.PHONE, phoneNumber); fragment.setArguments(args); return fragme...
Display confirmation code to verify phone numbers input in {@link CheckPhoneNumberFragment}
newInstance
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
Apache-2.0
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); mHandler = new ViewModelProvider(requireActivity()) .get(PhoneNumberVerificationHandler.class); mPhoneNumber = getArguments().getString(ExtraConstants.PHONE); if ...
Display confirmation code to verify phone numbers input in {@link CheckPhoneNumberFragment}
onCreate
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
Apache-2.0
@Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fui_confirmation_code_layout, container, false); }
Display confirmation code to verify phone numbers input in {@link CheckPhoneNumberFragment}
onCreateView
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
Apache-2.0
@Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { mProgressBar = view.findViewById(R.id.top_progress_bar); mPhoneTextView = view.findViewById(R.id.edit_phone_number); mCountDownTextView = view.findViewById(R.id.ticker); mResendCodeTextView...
Display confirmation code to verify phone numbers input in {@link CheckPhoneNumberFragment}
onViewCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
Apache-2.0
@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); new ViewModelProvider(requireActivity()) .get(PhoneProviderResponseHandler.class) .getOperation() .observe(getViewLifecycleOwner...
Display confirmation code to verify phone numbers input in {@link CheckPhoneNumberFragment}
onActivityCreated
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
Apache-2.0
@Override public void onStart() { super.onStart(); mConfirmationCodeEditText.requestFocus(); ((InputMethodManager) requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE)) .showSoftInput(mConfirmationCodeEditText, 0); }
Display confirmation code to verify phone numbers input in {@link CheckPhoneNumberFragment}
onStart
java
firebase/FirebaseUI-Android
auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/phone/SubmitConfirmationCodeFragment.java
Apache-2.0