-
Notifications
You must be signed in to change notification settings - Fork 195
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
Contact recognition #917
Comments
Thanks for reporting. These cases should have been handled correctly by libphonenumber. Apparently there is still some problem, I'll do some tests and get back to you ASAP. |
I forgot to ask you, what exact version of Kontalk are you using? F-Droid is currently hosting both beta and stable releases of Kontalk. You can see that in the About screen of Kontalk. Just a curiosity at this point since also version 3.1.10 is affected. |
This is more problematic than I thought. This has to wait for the new year, sorry. I'll publish beta5 now since it was expected today but the bug won't be fixed yet. |
Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Sorry I did not specified it before, my bad. It's Kontalk 4.0.0 beta4. I think that the issue has always been there, for i'm using (and trying to spread) Kontalk since version 2.something. A while ago I tried to debug a little this issue and saw that the phone number resolution was left to libphonenumber. The only solution I thought it could be a "solution", until libphonenumber resolves the issue, is to have a "default contact country code", and maybe "default area code", (which can be read from the telephone and changed by the user) so all numbers are preprocessed, but I'm almost sure that this would solve the problem for me but not for others (if it works, because the 9 would still be missing). Anyway, neither java nor android development nor telephony are my expertise, but I can test what you need. |
I've been told that even such a solution won't be enough because, among other problems, there are conflicts between area codes, e.g. there is "123" but also "1234". I've fixed the code to always include the 9 (which is apparently the "most correct" form, according to ITU standards) also when registering, so the matching would be exact on every case. However, to avoid inconsistencies and fix this now, users that registered without the 9 previously would have to register again... There a case that can't be handled with this format: 15 1234 5678 because you lack information to complete the number (the 11). I'm sorry this requires editing how you save your contacts in the address book. |
I think it's the most correct way to store phone numbers (at least in Argentina :P), so that part is ok :). Thank you :)
When the phone number is saved that way, (i think) the phone number belongs to the same area code of the caller (or Kontalk user in this case). So, if my area code is 341 and I've saved a contact as 15 123 4567, the area code goes before 15, leading to 341 15 123 4567 and the international number: +54 9 341 123 4567. Another way of saving contacts (that i've seen) is: 0 341 15 123 4567 (if that matters). What I meant: if the phone number is just 15 [0-9]{6,8}, the area code is my own area code. |
I'm afraid libphonenumber doesn't provide such features so I guess I'll have to implement these checks by myself. No problem with that, but I need some documentation stating what to do exactly. I mean I've seen cases with PI/PU conflicting (e.g. 345 and 3456), how do I distinguish those? It would mean a great deal of help if you could research that for the project and it would save me a lot of time (also because those documents are usually in the country's native language and I don't speak spanish). I'll consult with that friend of mine too so we can speed this up as much as possible. |
I'm sorry i did not answer before. I'm also looking for some technical information about this. |
Apparently, max number of digits should always be 10, so PI/PU length could be determined using that basis. |
Let me know when you have something more specific, we'll open another issue. |
I must first say that this issue has been a major drawback when asking people to install Kontalk.
Expected behavior
After registration, all of my contacts that are registered to the network should appear in my contacts list (within Kontalk).
Actual behavior
The only contacts that appear are those which I have in my phone with the exact same number that they used to register. I'll use as an example Argentina's telephone numbers and the subscriber number 1234-5678 with area code 11. From abroad one should dial (or save to the contacts list): +54 9 (area code) (subscriber number), that is +54 9 11 1234 5678. But within Argentina that number can be saved to the agenda as:
If I save my contact with +54 9 11 1234 5678 to my contact list but the other person registers with the phone number +54 11 1234 5678 (which is also correct) that contact is not shown to me on my Kontalk's contacts list.
Steps to reproduce
Environment
Kontalk version: F-Droid
Android version: 6.0.1 (CyanogeMod 13)
Device model: Samsung GT-I8260L
Other
A related issue can be seen when changing the phone number within the phone's contacts list. Change the phone number of a Kontalk available contact (?) and see how the name and phone number change within Kontalk's contacts list (the name changes for the one the user registered with and the phone number changes for hash@beta.kontalk.net)
The text was updated successfully, but these errors were encountered: