Skip to content

Phone auth UI area code wrong position #1555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jeffreyliu8 opened this issue Dec 18, 2018 · 13 comments
Closed

Phone auth UI area code wrong position #1555

jeffreyliu8 opened this issue Dec 18, 2018 · 13 comments

Comments

@jeffreyliu8
Copy link

7891877299955355863

@samtstern
Copy link
Contributor

@jeffreyliu8 that looks bad! But a screenshot is not enough information to debug this. A few questions:

  • If you run the sample app provided in the app module of this repo, can you reproduce the issue?
  • What version of FIrebaseUI are you using? What version of other dependencies are you using?

@iamdeadman
Copy link

Hi @samtstern

Facing the same issue here, Haven't tried with sample firebase android auth project but just did a fresh install of FirebaseAuthUi 4.3.0 and please find below the other firebase dependencies I am using if that could help debug and resolve this issue.

```

implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.firebaseui:firebase-ui-auth:4.3.0'
implementation 'com.google.firebase:firebase-dynamic-links:16.1.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-appindexing:17.1.0'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'com.google.firebase:firebase-config:16.1.2'
implementation 'com.firebase:firebase-jobdispatcher:0.8.2'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.7'
implementation 'com.google.android.gms:play-services-auth:16.0.1'


Please let me know if you need anymore information from my side in order to debug this issue further. 


Thanks, 
Harshit

@samtstern
Copy link
Contributor

samtstern commented Dec 23, 2018 via email

@iamdeadman
Copy link

Hi, supportLibraryVersion = '28.0.0' for all support libraries and 1.1.3 for constraint layout
// android support libraries
//noinspection GradleDependency,GradleCompatible
implementation "com.android.support:support-v13:$rootProject.supportLibraryVersion"
implementation "com.android.support:support-core-utils:$rootProject.supportLibraryVersion"
implementation "com.android.support:support-core-ui:$rootProject.supportLibraryVersion"
implementation "com.android.support:support-annotations:$rootProject.supportLibraryVersion"
implementation "com.android.support:support-compat:$rootProject.supportLibraryVersion"
implementation "com.android.support:design:$rootProject.supportLibraryVersion"
implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:support-vector-drawable:$rootProject.supportLibraryVersion"
implementation "com.android.support:animated-vector-drawable:$rootProject.supportLibraryVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:multidex:1.0.3'
implementation "com.android.support:support-fragment:$rootProject.supportLibraryVersion"

@MudiartaTauda
Copy link

I got same problem to
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout-solver:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.firebaseui:firebase-ui-auth:4.3.0'

@ghost
Copy link

ghost commented Dec 27, 2018

Same issue after i created custom layout for firebaseUI with AuthMethodPickerLayout class

public class MainActivity extends AppCompatActivity {
    private FirebaseAuth auth;
    private static final int RC_SIGN_IN = 123;
    private AuthMethodPickerLayout authMethodPickerLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        authMethodPickerLayout=new AuthMethodPickerLayout
                .Builder(R.layout.custom_layout)
                .setGoogleButtonId(R.id.google_btn)
                .setPhoneButtonId(R.id.phone_btn)
                .build();

        auth = FirebaseAuth.getInstance();
        if (auth.getCurrentUser() != null) {
            startActivity(new Intent(this, ProfileActivity.class));
            finish();
        } else {
            authenticateUser();
        }
    }

    private void authenticateUser() {
        startActivityForResult(
                AuthUI.getInstance().createSignInIntentBuilder()
                        .setTheme(R.style.LoginTheme)
                        .setLogo(R.mipmap.ic_launcher)
                        .setAuthMethodPickerLayout(authMethodPickerLayout)
                        .setAvailableProviders(getProviderList())
                        .build(),
                RC_SIGN_IN
        );
    }

    private List<AuthUI.IdpConfig> getProviderList() {
        List<AuthUI.IdpConfig> providers = new ArrayList<>();

//        providers.add(new AuthUI.IdpConfig.EmailBuilder().build());
        providers.add(new AuthUI.IdpConfig.PhoneBuilder().build());
        providers.add(new AuthUI.IdpConfig.GoogleBuilder().build());
//        providers.add(new AuthUI.IdpConfig.FacebookBuilder().setPermissions(Arrays.asList("public_profile", "user_friends", "publish_actions")).build());

        return providers;
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        IdpResponse response = IdpResponse.fromResultIntent(data);
        if (requestCode == RC_SIGN_IN) {
            if (resultCode == RESULT_OK) {
                startActivity(new Intent(this, ProfileActivity.class));
                return;
            }
        } else {
            if (response == null) {
                // User sign-in cancelled
                return;
            }
        }
    }
}

@ghost
Copy link

ghost commented Dec 28, 2018

Found solution:

If we add implementation 'com.firebaseui:firebase-ui-auth:4.3.0' this line into app/build.gradle file, that issue appears. So we have to change that implementation's version less than 4.3.0 like implementation 'com.firebaseui:firebase-ui-auth:4.1.0', it will work correctly!!!

But we won't use AuthMethodPickerLayout class and setAuthMethodPickerLayout method.

@TeTRA99
Copy link

TeTRA99 commented Dec 29, 2018

Same problem here.. working fine up to 4.2.0.

@Nemant
Copy link

Nemant commented Dec 31, 2018

+1, experiencing the same issue :/

@samtstern
Copy link
Contributor

I was able to confirm this issue in 4.3.0 and I believe it traces back to the removal of the baseline text view in this PR:
https://github.com/firebase/FirebaseUI-Android/pull/1537/files

cc @SUPERCILEX

@ghost
Copy link

ghost commented Jan 3, 2019

From Firebase Support:

Hello Tolga

Thanks for waiting, the engineering team has fixed this issue and it will be released on the version 4.3.1, again thanks for your feedback.

Best Regards
Eder Nava

@samtstern
Copy link
Contributor

The fix for this issue is in #1562, and we will do a release after that is merged.

@samtstern
Copy link
Contributor

This has been fixed and released in version 4.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants