cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen J Fuhry (JIRA)" <>
Subject [jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
Date Sat, 21 Jul 2012 04:07:33 GMT


Stephen J Fuhry commented on CB-1047:

The documentation should be updated around here if the above pull request is merged in:

I'm almost wondering again, at this point, if we should differentiate on a higher level between
install id's and uuid for the sake of sanity. I mean, at this point, if the above patch is
submitted, that pretty much redefines uuid for everything except some versions of iOS. So
maybe we should take another look at this problem: let's face it, there is really no such
thing as a uuid from a cross platform perspective. Maybe we should be, then, differentiating
entirely between uuid (which we could leave up to the platform's deficiencies), and the install
id. Anyone have any feedback on that? 

At any rate, I'd be happy to submit a pull request in the docs as well, but I don't think
that it would make sense to until I get some feedback on the above pull request.

If someone can give me some higher level direction I'd be happy to take some of the legwork
upon myself.
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations
> ------------------------------------------------------------------------------------------------------
>                 Key: CB-1047
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Wish
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Stephen J Fuhry
>            Assignee: Joe Bowser
> There are many documented situations where the following does not really return a unique
identifier ([link to cordova source|;a=blob;f=framework/src/org/apache/cordova/]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> see also:
> I've used the above mentioned solution in native Android applications without issue.
> It *might* make sense to offer this as a value completely separate from device.uuid..
there are many reports that some hardware vendors are actually populating ANDROID_ID with
a manufacturer ID (i.e. ANDROID_ID returns a value, but it is not unique between devices of
the same make / model! How deceptive.).
> Perhaps it could be offered as:
> {code:javascript}
> device.install_id
> {code}
> or something so that developers could opt-in to use it? This way it wouldn't break BC
for those who are interested in maintaining device or install ids from previous versions.
Then, you could get a guaranteed unique id by doing:
> {code:javascript}
> var deviceId = ('install_id' in device ? device.install_id : device.uuid);
> {code}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message