Skip to content
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

Android Background #114

Open
VincentRoest opened this issue Jan 29, 2018 · 5 comments
Open

Android Background #114

VincentRoest opened this issue Jan 29, 2018 · 5 comments

Comments

@VincentRoest
Copy link

VincentRoest commented Jan 29, 2018

Issue Description

The user opens the accountkit modal on Android, fills out a phone number and backgrounds the app. The modal disappears from view, and the user cannot complete the login-process. I believe this is due to the fact that the intent is null (as mentioned in #61 by @tszajna0). The fix was to reject the promise and return. However, this means that the login flow breaks. A solution would be to find out why this intent is null, or find a way to let the dialog not be dismissed. Maybe we need to update the android part of this module to re-fit with the official Facebook AccountKit Android SDK?

I tried running the "official" example project on https://github.com/fbsamples/account-kit-samples-for-android, and here the login dialog does not disappear after pressing the home button. Comparing this file with https://github.com/fbsamples/account-kit-samples-for-android/blob/master/samples/AccountKitSimpleSample/src/main/java/com/example/accountkitsimplesample/MainActivity.java,I noticed that the onActivityResult functions are quite similar, so I doubt whether the problems arise there. I do get one cryptic error when I for instance not background the app, but press the back button to return to my app, namely: { [Error: 0] framesToPop: 1, code: 'error' }.

Might relate to #90

Steps to Reproduce / Code Snippets

Running the sample code

Expected Results

The dialog is not dismissed when going to background, just as in the official Facebook account kit android sample.

Additional Information

  • React Native Account Kit version: 0.9.0
  • React Native version: 0.52.0
  • Platform(s) (iOS, Android, or both?): Android

issue

@RossKinsella
Copy link

I've been getting an intent of null when calling AccountKit.loginWithPhone() on Android 4.4 (19)

@zachrnolan
Copy link

I'm also experiencing this on Android.

  1. Enter phone number in AccountKit
  2. Background the app to get to the text message app
  3. Re-open app
  4. AccountKit is showing the "Enter your mobile number" screen again.

There are a few ways that users are currently able to get past this:

  1. See the text notification while in the app and enter it quickly
  2. If they have automatic verification through android

If none of the above ways are done, a user will get stuck in an endless loop of trying to get the code to enter it. This seems like a pretty significant issue.

RN 0.54.1
react-native-facebook-account-kit 0.8.0
Testing on a Samsung Galaxy S7 (Android 7.0)

@vwalletviettel
Copy link

It only occurred once, after kill or shut down this App, this bug will disappear. Anyone has solution for this case?

@ducpt2
Copy link

ducpt2 commented Nov 7, 2018

+1 for the issue. I am facing the same problem.

@jpgarcia
Copy link
Contributor

Guys, can you try with the latest version?

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

7 participants