Answer the question
In order to leave comments, you need to log in
How to get mobile phone number in phonegap?
At the moment I am writing an application on build.phonegap. In order not to force clients to log in every time, I wanted to log in by phone number.
There was a problem how to get a phone number from the device. I found this plugin https://build.phonegap.com/plugins/300 but for some reason it always gives an empty value as a result.
Has anyone worked with this plugin, I will be grateful if you share the code, how can you get the phone number of a mobile device using this plugin.
Answer the question
In order to leave comments, you need to log in
This plugin is only for android, because you can only get a phone number on android, or jailbreak iPhone. Usually they do this, at the first start they are asked to enter their phone number. Further, in order to confirm it, a person is sent an SMS with a code, the person enters the code, thereby confirming his phone. You generate a session id on the server, bind it to the device, put it in localstorage. Everything, at the next start, if there are idsessions, you think that the user is authorized, if not, then this is the first launch -> see the beginning
Yes, I will only have an application for androyd. So don't be afraid. I just didn’t want to mess with SMS. I would like to just get the phone number with this plugin and send it to the server along with IMEI. IMEI plugin works clearly and without problems. It remains to solve the problem with the phone number.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question