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

User phone numbers and country should be input automatically #654

Closed
cmcewen opened this issue Aug 20, 2019 · 5 comments · Fixed by #1310
Closed

User phone numbers and country should be input automatically #654

cmcewen opened this issue Aug 20, 2019 · 5 comments · Fixed by #1310
Assignees
Labels
enhancement an improvement to an existing feature Priority: P2 Major triaged label for issues that have been assigned a priority wallet

Comments

@cmcewen
Copy link
Contributor

cmcewen commented Aug 20, 2019

Expected Behavior

read both the country and phone number automatically, present both as a placeholder so the user can edit if incorrect.

If there are multiple phone numbers detected, present the default modal with options to prompt the user to select the correct one.

We use the Android hint picker so people don't have to type as much
https://developers.google.com/identity/sms-retriever/request (though apparently there are some bugs googlearchive/android-credentials#27)

Current Behavior

Everyone has to type

@jmrossy jmrossy changed the title Users SBAT choose their phone number using the Android Hint Picker when available User phone numbers and country should be inputted automatically Sep 10, 2019
@cmcewen cmcewen changed the title User phone numbers and country should be inputted automatically User phone numbers and country should be input automatically Sep 10, 2019
@martinvol
Copy link
Contributor

martinvol commented Oct 9, 2019

To autocomplete phone number (not fully sure this includes country code), the app should have PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE, the system displays this request as "make and manage phone calls". Is this acceptable? @nityas

Alternative option to complete only country code will be using an API to get the phone's public IP, then use a geoIP library and then convert that to a phone country code.

Example of API to get IP: https://github.com/sindresorhus/ipify
Example of library to map IP to country: https://github.com/bluesmoon/node-geoip

@jmrossy
Copy link
Contributor

jmrossy commented Oct 9, 2019

My feeling is that heavy permissions is not worth the feature.
Are we 100% sure there's no way to get it without that permission? I think I saw an app do it once but can't remember if that was iOS or Android?

@cmcewen
Copy link
Contributor Author

cmcewen commented Oct 9, 2019

@martinvol the link above in the issue description has the API to do it without permission - creating a hint request (https://developers.google.com/identity/sms-retriever/request)

@martinvol
Copy link
Contributor

Thanks @cmcewen, my bad.

I didn't find anything implementing that in React Native so I'm now bridging the Java example to RN.

@jmrossy
Copy link
Contributor

jmrossy commented Oct 10, 2019

@martinvol FYI we have already forked the SMS retriever RN package so you can make your changes to our fork :)

@nityas nityas added enhancement an improvement to an existing feature Priority: P2 Major triaged label for issues that have been assigned a priority labels Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement an improvement to an existing feature Priority: P2 Major triaged label for issues that have been assigned a priority wallet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants