• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
1

Mobile Device Unique id

Explorer ,
Mar 10, 2011 Mar 10, 2011

Copy link to clipboard

Copied

Hey all,

I am starting down the path of creating a mobile application and I have a need for a deviceid (something unique to the particular mobile device.) so that I can register the application for use with Multi-Factored Authentication.  Is there an API somewhere in the Flex Framework or the upcoming mobile release where I can access a unique id for the device the app is running on?

Views

29.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 10, 2011 Mar 10, 2011

Copy link to clipboard

Copied

I guess one more piece of information will be helpful.  This is the recommended call by Apple for Objective C:

[[UIDevice currentDevice] uniqueIdentifier]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 10, 2011 Mar 10, 2011

Copy link to clipboard

Copied

I was just going to open a thread about this myself for what ultimately is the most important thing of all MobileApplications advertisement banners.

Your question only addresses one of these requirements, and there is a load of concern around this issue. I suppose I'm kind of documenting some of my research around these issues so bear with me and I'm sure it will be useful in varying ways to varied people and their needs.

The UDID is the Unique Device ID and is a truly globally unique value. It's ideal but a privacy concern.

If like myself you’re tracking banners or a potentially limited user base and a random (actually impossible) duplicate isn't really critical you can generate one randomly.

For the iPhone & Android the data is there somewhere...
http://www.innerfence.com/howto/find-iphone-unique-device-identifier-u did

I actually wanted to get the phone-number as a global UUID but I don't think that’s ever going to be possible or acceptable (security policies).


It's critical to access this, but I suppose asking for an email is an alternative that transcends the device and is more to the user and grants permission which will eventually be an issue.

In ActionScript all objects can get Unique IDs and you can use this utility Class method to do basically the same thing...

UIDUti.createUID()

Or try this? Let me know how that works...

http://code.google.com/p/flex-ad-by/

And store them in the Application's PersistanceManager or preferences ultimately.

Also you'll want the Locale which is a lowercase Language "Underscore" uppercase Region or country code (2 letters I believe).

Sure you can ultimately Localize your app with string loading but knowing the Language and Country of the user is again potentially best a preference but this typically is not something we want to deal with (especially for the purpose of monetizing MobileApplications).

http://help.adobe.com/en_US/as3/dev/WS9b644acd4ebe59998b99a90125fc4fec fb-7ffc.html

We can maybe try this...

flash.system.Capabilities.language

These sound interesting..

var loc:LocaleID = new LocaleID("es");
trace(loc.getLanguage()); // es
trace(loc.getRegion()); // ES

Anyway next is the position (as in Map location) Longitude & Latitude, (for ads needs a UTC timestamp as long as well ~ ya javay to json issues)
You could at a given moment consider this as unique as well as us it to get the Region but as to how I'm not certain either.

import flash.sensors.Geolocation is availible for Flash Builder Buritto MobileApplications I believe.
I think I'm considering what's called "reverse geocoding" but as one travels the App's Language is probably best.
http://blog.programmableweb.com/2008/10/24/google-maps-api-gets-reverse-geocoding/

http://code.google.com/apis/maps/documentation/flash/tutorial-flexbuilder.html


I'm not certain about getting the country at the moment of banner display from this stuff yet either. Still one can pass that and it probably overrides the Locale fields transmitted to AdMob for instance.

Using the recommended
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/lang/Locale.html
fl.lang.Locale

stuff would let you get language for whatever language your apps capible of.
Of course the AreaCode of the phone number would also help with region and language somewhat I suppose, but not ideal either.

Basically your right MobileApplications and AIR 10.3+ and need a class for accessing all the device information! Where is it? Or please Adobe create it.
[wishlist] MobileDeviceInfo might be a good name for that it would contain. Ideally...
The Device Phone Number, maybe a user’s email, the UDID, the Locale (Language and Region), etc.
We do have various ways to peck at Language, Region, randomly generate unique id's and store them per app/user.

Oh here's another final thought for you there is the option of using Facebook APIs to get an email or unique ID as well.
I'm guessing it's a complicated set of combined techniques that will ideally do it's best to create what's needed from what info is available for all the different deployable platforms one AS3 SWF can be deployed on.

Also as an afterthought you might setup a server to acquire the random IDs and therefore retain uniqueness that way. I don't thing the banner services are smart enough to provide that idea yet.
I'm questing there's something like that out there already.

http://forums.adobe.com/thread/601145

http://help.adobe.com/en_US/FPS/Social/1.0/WS92baf4db13ca494d65a99e7012483671c69-8000.html

Oh another thought traceroute might be able to generate a unique session id too. AIR can call commands with...
http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/desktop/NativeProcess.html
NativeProcess
so you could also use a lot of other stuff to help, like Alchemy can even call C and stuff that's outside of the Class potential of AS3&AIR Classes.

I think I've said enough for now. Let me think about it some from my perspective do some more research and maybe I'll hit back here later and try to provide an ordered list of techniques I've resorted to.

Okay so you got through all that? Wow...

http://www.appbrain.com/app/device-info/air.nl.funkymonkey.DeviceInfo

Maybe see where this leads too then, and let me know.

Tis this...

http://www.funky-monkey.nl/blog/2010/11/11/getting-device-properties-like-os-model-brand-sdk-version-and-cpu-on-air-for-andoid/

It's just build properties for Android, no phone UDID in that file but it could be located somewhere similarly...

I recall there was something I believe (can't find it now) to do with possibly RTMP and getting a free AppID to find and connect devices, this would probably have a Unique ID somewhere. Maybe silly to use it for just that though. It was something where the second generation version allowed Peer replaying for video conferencing etc.

Also in BETA is this...

http://labs.adobe.com/technologies/flashmedia_gateway/

FMG I wondered if it as well as the ability to provide essentially a UDID too? No this is just extending RTMP.

Okay maybe this is what I wanted to research on again...

http://labs.adobe.com/technologies/cirrus/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 10, 2011 Mar 10, 2011

Copy link to clipboard

Copied

Thank you for trying to answer my question, but I dont' have a question about how to create a uniqueid as in a GUID.  My question is in the first part of your answer, the unique id of the device.

This is important to me because for me to use an encryption scheme for Multi Factored authentication, I need to register the device and sync it up with my authentication system so that the app can generate a random number based on that ID and the date/time stamp as inputs.

I could just generate my own key, but it can't be persisted across a flash of the OS on the mobile device.  Only the ID of the device will persist, so I am looking for a Flash method I can call to obtain the deviceid.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2011 May 01, 2011

Copy link to clipboard

Copied

Hi.

Did you ever find an answer to this? AS4more's answer is certainly very detailed, but talks mostly about getting the phone number. I'm guessing from the lack of documentation and forum replies that getting the UDID is not possible, but can you confirm either way? Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 02, 2011 May 02, 2011

Copy link to clipboard

Copied

Yes. The answer is that it is currently not available. At the 360

conference in April I asked for Adobe's ideas on giving more information

about the device and they are following up. If I find any sort of timeline

I will post it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 02, 2011 May 02, 2011

Copy link to clipboard

Copied

You use the MAC address of the device.

To obtain the address at runtime, use the NetworkInfo class, which gets a list of interfaces

and looks for a hardwareAddress. It is the MAC address for your device:

if (NetworkInfo.isSupported) {

trace("network information is supported");

}

var network:NetworkInfo = NetworkInfo.networkInfo;

for each (var object:NetworkInterface in network.findInterfaces()) {

if (object.hardwareAddress) {

trace(object.hardwareAddress);

}

}

The address looks something like this:

00:23:76:BB:46:AA

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 02, 2011 May 02, 2011

Copy link to clipboard

Copied

That seems like a good interim solution! Thanks for the snippet. The

solution I went would not persist on the device through a flash or

reinstall. The MAC address would be the best hope for a persistant uniqueid

so far.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 02, 2011 May 02, 2011

Copy link to clipboard

Copied

Google does not recommend using the MAC ID as an identifier because devices might not always have one available.  See this page for more information on unique device IDs: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 02, 2011 May 02, 2011

Copy link to clipboard

Copied

And that good interim solution goes down in dramatic flames. Thank you for

the follow-up.

I'll wait until there is a reliable, consistent, method for getting a

uniqueid. By then I'll be happy with the solution I have, which is

basically making a uniqueid and using part of it for a serial number. It

doesn't persist across reloads, but competitive applications have the same

issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 02, 2011 May 02, 2011

Copy link to clipboard

Copied

Thanks everyone for the replies. Sadly, lack of a persistent (and consistent) per-device identifier is a bit of a dealbreaker for me, so I guess I'll just watch and wait for a helpful update from Adobe. curtis33321, please do post again if you hear anything about timeframes.

Cheers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 03, 2011 Oct 03, 2011

Copy link to clipboard

Copied

I've been offline for 6 months...

You might want the power of neustar... but it will cost you.

http://www.neustar.biz/

actually... https://www.intelligentcloud.biz/ but it's not working as I right this... says it's 503 = temporary

My system is now very complicated with a rich set of features, and beyond this discussion. It's basically the same as hardwareAddress involves a little external remote_ip.php optionally too etc. and I feel no need for Neustar, or more.

I will say that in the end it's in the laws to ask them to "opt in" (and have a way out), so you might as well ask for an email or phone number or whatever if that's what you want, but it better be worth their while or forget it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 11, 2011 Oct 11, 2011

Copy link to clipboard

Copied

Ditto. No device id is a MAJOR drawback to Flex for me. I really want to be able to write once and deploy to all platforms with Flex. But, when I can't positively ID the device with Flex, it makes it a less appealing choice than it could be. Flex is great, in general. If this issue could be fixed, it would really help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 15, 2011 Oct 15, 2011

Copy link to clipboard

Copied

I believe Flex/AIR does not provide this API since Android doesn't appear to provide a good enough API for it and Google recommends against this approach (http://android-developers.blogspot.com/2011/03/identifying-app-installations.html).

If you want to risk using one of the suggestions in that article then you could build a native extension to expose that information to your Flex/AIR application (http://www.adobe.com/devnet/air/native-extensions-for-air.html).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 08, 2012 Jun 08, 2012

Copy link to clipboard

Copied

Has anyone found a solution to this yet?

Adobe has created a NativeExtension for this for iOS - though I'm not quite sure why Adobe didn't build this as part of the built-in NetworkInterface class that can be used for the Desktop and AIR for TV?

http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/net/NetworkInterface.h...

Is there a NativeExtension for Android?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

Relying on a device id is bad practice. They are easily spoofable and not consistent across platforms. IMHO, It is better (more secure and more reliable) to issue revocable certificates that are not hardware dependant.

Here is a good abstract on the topic:

http://www.zurich.ibm.com/~cca/papers/klm.pdf

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 10, 2012 Jul 10, 2012

Copy link to clipboard

Copied

Hi,

Perhaps its possible to use EncryptedLocalStore.

I don't know if its persistent on a mobile device.. but ill find out... or perhaps someone can tell if he tried it.

http://livedocs.adobe.com/flex/3/html/help.html?content=EncryptedLocalStore_1.html

http://devgirl.org/2011/09/22/flex-mobile-development-encrypting-data/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 28, 2012 Jul 28, 2012

Copy link to clipboard

Copied

I read it was persistent, if you can confirm it would be awesome!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 22, 2012 Oct 22, 2012

Copy link to clipboard

Copied

This is what it says:

"When you uninstall an AIR application, the uninstaller does not delete data stored in the encrypted local store."

http://livedocs.adobe.com/flex/3/html/help.html?content=EncryptedLocalStore_1.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

LATEST

We have recently developed an ANE that has tried to solve this problem by giving you access to different device identifiers. You can try the ANE here GitHub - myflashlab/UDID-ANE: Use this AIR Native Extension to obtain a unique device ID in your Ado...

The ANE provides you with the following Identifiers:

  • Android ID
  • Serial Number
  • Telephony Device ID
  • Telephony Subscriber ID
  • UUID
  • Unique Vendor ID

myflashlabs Team (@myflashlab) | Twitter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines