Java – unable to detect an existing phone number
•
Android
I want to see if there are contacts in the contact database. I propose the following code:
However, if there are contacts on the device, it always gives me the wrong prompt. I also integrate permissions into the list
resolvent:
A few hours later, I found an error. Basically, on some devices, the above code may not work properly. To be 100% sure, you will need to use the following code:
As you can see, it lists all contacts in the device, not just that you can check whether it matches the number you provide
A simpler solution:
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码