Wednesday, February 22, 2012

Adobe AIR native extension - Read phone number from device

I had a chance to work on lot of interesting projects in CandymanLab. Recently we worked on Android application built in Adobe AIR. One of requirements was to read a phone number from device. Google told us that there is no open source solution for this and we came up with pretty neat extension that do the job.
You can download ANE file from here .

All you need to do in order to use it is to add ANE file to the project and add READ_PHONE_STATE permission in manifest.


private var phoneNumberExt:PhoneNumberANE;
private var myPhoneNumber:String;

protected function getPhoneNumber():void
{
phoneNumberExt = new PhoneNumberANE();
myPhoneNumber  = phoneNumberExt.phoneNumber;
}

Hope you will find it usefull



8 comments:

  1. Thanks a lot for your extension. Is there any chance you're going to make a similar extension for iOS? :)

    ReplyDelete
  2. Link is not working!!!

    ReplyDelete
  3. Anonymous9:01 AM

    Please, check the link. It's not working!

    ReplyDelete
  4. Sorry about broken link...

    Here it is https://dl.dropbox.com/u/26535954/PhoneNumber.ane

    ReplyDelete
  5. Anonymous2:27 AM

    Thank you very much!
    But, would you give me the source code of PhoneNumber.ane?
    Thanks!
    mail: y_boy@126.com

    ReplyDelete
  6. hello, i'm receiving "unknow"... any solution?

    ReplyDelete
  7. it returns unknown, any lead

    ReplyDelete
  8. Anonymous4:23 AM

    Giving me unknown

    ReplyDelete