Skip to main content
April 18, 2011
Question

Possible to obtain phone IMEI number with flex mobile project?

  • April 18, 2011
  • 2 replies
  • 4821 views

Just like the title says, is it possible to obtain phone IMEI number with flex mobile project? If not, does anyone know of another method to get a unique number to identify the phone being used (on android and iphone)? I'm asking because I'm building a chat application, and I need a way to potentially ban users based on something other than an IP address.

edit: now that I think about it, an IMEI number might not be the best way, since wifi tablets may not hav an IMEI number, anyone have any other idea how I could get a number to identify a device that would already be present, because i'm afraid if its something generated by me, a simple uninstall and re-install could circumvent a ban.

This topic has been closed for replies.

2 replies

Inspiring
October 4, 2012

If this is an Android project, you can use this ANE:

http://blog.snowflax.com/native-imei-action-script-extension-for-android/

I have verified that it does work and provides the IMEI.  For cases where there is no IMEI ( bc the device is not a mobile phone, or it uses IMSI instead ), you can just bypass the device id check with your database, and enable full functionality.

Although this is not full-proof, it will nevertheless screen a lot of devices.  With this, you can keep track of the number of app installs / resets, and add a 'banned' flag if you want to in your DB -- if you see unusal activity ( like:  unsually high number of re-installs ).

----->  UPDATE:

I just found this ANE which  includes a class called 'SystemProperties', to find the IMEI/IMSI/serial/phone number on Android, and the MAC address on iOS:

https://github.com/mateuszmackowiak/NativeAlert

I have verified that the iOS part works, but haven't tried the Android side, yet.  Note: for iOS, it will also give you a UUID ( even though the object tag claims it is the UDID -- it's not ), which is worthless as a persistent means of identifying the device. since it gets reset on each app re-install.  So, for iOS, you have to use the MAC address, unless you are willing to store/restore the UUID into EncryptedLocalStore, as suggested by a user in:

http://stackoverflow.com/questions/6794493/get-unique-identifier-mac-address-udid-etc-in-adobe-air-for-ios

Participating Frequently
April 18, 2011

I know of a few other people trying to make a GUID number for mobile devices and all seem to have had to come up with their own solution. Yes, your application data can be cleared so you can't rely on that. Ultimately there isn't one on the device and you'll have to come up with a solution that works for your business case.