Search code examples
titaniumappceleratorappcelerator-titaniumappcelerator-mobilesim-card

How can I get device phone number in Appcelerator Titanium?


Recently I found that in Cordova it is possible to obtain user's phone number (cordova plugin link).If Cordova can do that, than Appcelerator should too.

How can I do that in Appcelerator Titanium?


Solution

  • I made a module a while ago and uploaded it to github: https://github.com/m1ga/com.miga.gsm

    • Version 1.0: Ti 5.x
    • Version 2.0: Ti 6.x

    this will get you some of the fields the cordova plugin gives you. It will read the phone number but as mentioned in the page you've posted it's not reliable.