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

Feature/registration usability #724

Closed

Conversation

funk78
Copy link

@funk78 funk78 commented Feb 25, 2014

FREEBIE
#703 is now tested and works on my Galaxy Note 2.

It adds a feature so that the countrycode is automatically detected and the displayname and countrycode textfield is auto-filled.

@mcginty
Copy link
Contributor

mcginty commented Feb 25, 2014

How does this work in devices that don't have SIM cards?

@funk78
Copy link
Author

funk78 commented Feb 25, 2014

@mcginty no idea, probably telephonyManager.getSimCountryIso() would return null? I did not know that the app works on devices without a sim card. How do you verify a device without a sim card via SMS or phone call? What type of device are you thinking of?

@rhodey
Copy link
Contributor

rhodey commented Feb 25, 2014

@mcginty I think the only non-sim card case we need to worry about at the moment is Google Voice registration on CM. #604 seems to imply that you can use a voice # with CM just as you would a # provided by sim.

@moxie0
Copy link
Contributor

moxie0 commented Feb 25, 2014

The registration screen already populates the country code if the device has a sim card. Is there a problem with it?

@0xACE
Copy link

0xACE commented Feb 25, 2014

I tried the installation of the app today on a phone and it wouldn't automatically fill in the country code...

About the installation process:

  • The version from google play, this morning
  • Samsung galaxy s3 (gti9300) stock v4.2
  • has valid swedish simcard.

Same on the Galaxy s2 plus, don't know about the android version it's using.

@funk78
Copy link
Author

funk78 commented Feb 25, 2014

@moxie0 Are you having RegistrationActivity.initializeNumber() in mind? That did not work on my phone at all, i am using a german sim card. TelephonyManager.getLine1Number() may return null for some devices/sim cards.

@lorenzhs
Copy link

@funk78 the same is true for all other messengers though, hangouts can't autodetect my phone number either. I'd consider this a bug with German SIM cards, not TextSecure.

@funk78
Copy link
Author

funk78 commented Feb 26, 2014

The way it is working with this branch is that first it will auto-fill the country code and set the display name in the spinner. After that if possible the whole number is beeing auto-filled.

Even if the TelephonyManager.getLine1Number() returns a valid number this feature helps to set the spinner to the correct country.

From looking at the code I think at the moment the user would see "Select a country" in the spinner even if his number was auto-filled.

@moxie0
Copy link
Contributor

moxie0 commented Feb 26, 2014

so getLine1Number fails on your sim, but getcountryiso succeeds?

@moxie0 moxie0 self-assigned this Feb 26, 2014
@funk78
Copy link
Author

funk78 commented Feb 28, 2014

@moxie0 Yes, exactly. It is not only my sim, there are several topics regarding that issue: https://www.google.de/search?q=getline1number&oq=get&aqs=chrome.0.69i59j69i57j69i59j69i61j0l2.967j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8

@lorenzhs
Copy link

lorenzhs commented Mar 1, 2014

@funk78 well, the most prominent result to your search link seems to be http://stackoverflow.com/a/5134725, so there's that. Hangouts asks too, for example. Some providers just don't store the phone number on the SIM.

@funk78
Copy link
Author

funk78 commented Mar 1, 2014

more people requesting this feature: #904

@ncruces
Copy link

ncruces commented Mar 2, 2014

Yes, this happens with newer Vodafone PT SIMs as well. "My phone number" is "Unknown" in system settings.

This number is stored locally on the SIM, and therein lies the problem.

In the micro/nano SIM transitions you buy phone and it comes preloaded with a micro/nano SIM (and an associated phone number) which you can use right away. But you want to keep your old number, and you don't have a micro/nano SIM around. So the operator associates the new SIM with the old number, which would make having the number stored in the SIM wrong. So that field is empty for many newer SIMs.

I've switched SIMs 3 times in the past 3 years; all of them had this field empty. Some older phones allow setting/changing this number, but no Android phones that I know of do.

@funk78
Copy link
Author

funk78 commented Mar 3, 2014

A friend of mine gets even returned an invalid number by the getLine1Number() function. If i remember it correctly it was 491760000000.

So even if you get a number returned by getLine1Number() it may be invalid.

@moxie0 Any specific reason why this PR is not beeing merged? Shall i merge the current master into it?

@moxie0
Copy link
Contributor

moxie0 commented Mar 7, 2014

@funk78 The current diff is pretty large. It seems like this could probably be done with two lines in the initializeNumber() method of RegistrationActivity?

@moxie0
Copy link
Contributor

moxie0 commented Jun 4, 2014

Thanks, I slimmed this down in df1c96a

@moxie0 moxie0 closed this Jun 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants