1 Reply Latest reply: Jan 4, 2013 9:18 PM by david_yen RSS

    How to get Android IMEI / UDID with Flash CS6?


      Hi. I understand that a Native Extension is needed to get the IMEI or UDID of the Android device. I found one here:




      I ran the compiled sample this site provided and it retrieved my IMEI fine, so I know it works.


      However, the code for this sample is in Flex. When I tried to incorporate it into my Flash CS6 .fla it didn't work. There were no errors, but when I ran in on the Android device nothing happened when I clicked on the button to retrieve the IMEI. I don't know what went wrong. Here is what I did:


      1. First, I imported the "IMEI.ane" file using the steps below:



      2. Then in my AIR 3.2 for Android settings I included the "IMEI.ane" file in the publish General settings.


      3. In my program there is a textbox and a button. When the button is clicked with a mouse, it calls the function below and places the returned string in the textbox. I know the string to textbox part works, however, when I call the function below it doesn't.


             import com.chi.imei.Deviceimei;

             import com.chi.imei.DeviceStats;


                    private function mGetImei():String


                           var tImeiStr:String = " ";


                           var obj:DeviceStats = Deviceimei.deviceimei.deviceinfo();

                           tImeiStr = obj.imei.toString();


                           return tImeiStr;



      4. My FlashDevelop intellisense recognizes all the lines above so I think it properly found the classes. However, it doesn't work on the device! Can anyone tell me how to fix this?


      Thank you!