You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Stephen J Fuhry (JIRA)" <ji...@apache.org> on 2012/07/12 19:02:33 UTC

[jira] [Created] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Stephen J Fuhry created CB-1047:
-----------------------------------

             Summary: Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
                 Key: CB-1047
                 URL: https://issues.apache.org/jira/browse/CB-1047
             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):

{code:java}
android.provider.Settings.Secure.ANDROID_ID
{code}

Would it make sense to implement a solution like this?

http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
see also: http://stackoverflow.com/a/2853253/111033

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 = (device.install_id === null ? device.uuid : device.install_id);
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454220#comment-13454220 ] 

Joe Bowser commented on CB-1047:
--------------------------------

@Stephen Are you still interested in this issue? Let us know.

Thanks
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420089#comment-13420089 ] 

Simon MacDonald commented on CB-1047:
-------------------------------------

Hey Stephen,

I reviewed the code and I don't think we should merge it in. It does redefine what device.uuid means, in fact it replaces it with and application ID. It might be better to have something like this under the app variable. Also, we need to consider what happens when someone reinstalls the app. Do they get a new ID?
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419643#comment-13419643 ] 

Joe Bowser commented on CB-1047:
--------------------------------

@Stephen: It doesn't look like we got to this.  Would you mind sending a pull request for this this one so we remember to do it?
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419676#comment-13419676 ] 

Stephen J Fuhry commented on CB-1047:
-------------------------------------

[~bowserj] See: https://github.com/apache/incubator-cordova-android/pull/36
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen J Fuhry updated CB-1047:
--------------------------------

    Description: 
There are many documented situations where the following does not really return a unique identifier ([link to cordova source|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):

{code:java}
android.provider.Settings.Secure.ANDROID_ID
{code}

Would it make sense to implement a solution like this?

http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
see also: http://stackoverflow.com/a/2853253/111033

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}

  was:
There are many documented situations where the following does not really return a unique identifier ([link to cordova source|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):

{code:java}
android.provider.Settings.Secure.ANDROID_ID
{code}

Would it make sense to implement a solution like this?

http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
see also: http://stackoverflow.com/a/2853253/111033

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.uuid : device.install_id);
{code}

    
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420092#comment-13420092 ] 

Stephen J Fuhry edited comment on CB-1047 at 7/22/12 3:03 AM:
--------------------------------------------------------------

Thanks for the feedback, Simon.

I'm really glad that you're having some of the same reservations that I am with that approach. I totally agree, this does not really belong in the "device" namespace. It belongs in an "install" namespace. You mentioned an "app variable.".. I haven't looked through the phonegap source for this, but I don't see this anywhere in the documentation any mention of an application object or anything like that.. can you point me in the right direction?

I'm happy to do the work to get this out (at least on Android, might be able to coerce a friend to do the iOS portion, but we'll see).. so just point me to where this stuff should go and I'll submit another pull request.

Oh, and in terms of what happens when you reinstall and all that.. yeah, that's a whole other issue. I'll take a look in the morning at some other code I wrote that implements this same strategy.. yeah, you're totally right, there needs to be a strong definition of what this unique id _really_ represents.
                
      was (Author: fuhrysteve):
    Thanks for the feedback, Simon.

I'm really glad that you're having some of the same reservations that I am with that approach. I totally agree, this does not really belong in the "device" namespace. It belongs in an "install" namespace. You mentioned an "app variable.".. I haven't looked through the phonegap source for this, but I don't see this anywhere in the documentation any mention of an application object or anything like that.. can you point me in the right direction?

I'm happy to do the work to get this out (at least on Android, might be able to coerce a friend to do the iOS portion, but we'll see).. so just point me to where this stuff should go and I'll submit another pull request.
                  
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419665#comment-13419665 ] 

Stephen J Fuhry commented on CB-1047:
-------------------------------------

[~bowserj] I'll take a stab at it. Unless you care to offer some specific guidelines, I'll just implement it inside the [Device class|https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/Device.java] using private methods. I'll go ahead and get started now, shouldn't take long.
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420092#comment-13420092 ] 

Stephen J Fuhry commented on CB-1047:
-------------------------------------

Thanks for the feedback, Simon.

I'm really glad that you're having some of the same reservations that I am with that approach. I totally agree, this does not really belong in the "device" namespace. It belongs in an "install" namespace. You mentioned an "app variable.".. I haven't looked through the phonegap source for this, but I don't see this anywhere in the documentation any mention of an application object or anything like that.. can you point me in the right direction?

I'm happy to do the work to get this out (at least on Android, might be able to coerce a friend to do the iOS portion, but we'll see).. so just point me to where this stuff should go and I'll submit another pull request.
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419740#comment-13419740 ] 

Stephen J Fuhry commented on CB-1047:
-------------------------------------

The documentation should be updated around here if the above pull request is merged in: https://github.com/phonegap/phonegap/blob/2.0.0/doc/cordova_device_device.md.html#L595

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 in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen J Fuhry updated CB-1047:
--------------------------------

    Description: 
There are many documented situations where the following does not really return a unique identifier ([link to cordova source|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):

{code:java}
android.provider.Settings.Secure.ANDROID_ID
{code}

Would it make sense to implement a solution like this?

http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
see also: http://stackoverflow.com/a/2853253/111033

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.uuid : device.install_id);
{code}

  was:
There are many documented situations where the following does not really return a unique identifier ([link to cordova source|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):

{code:java}
android.provider.Settings.Secure.ANDROID_ID
{code}

Would it make sense to implement a solution like this?

http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
see also: http://stackoverflow.com/a/2853253/111033

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 = (device.install_id === null ? device.uuid : device.install_id);
{code}

    
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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.uuid : device.install_id);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419676#comment-13419676 ] 

Stephen J Fuhry edited comment on CB-1047 at 7/20/12 11:18 PM:
---------------------------------------------------------------

[~bowserj] See: https://github.com/apache/incubator-cordova-android/pull/36

Let me know if that will do.
                
      was (Author: fuhrysteve):
    [~bowserj] See: https://github.com/apache/incubator-cordova-android/pull/36
                  
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413008#comment-13413008 ] 

Simon MacDonald commented on CB-1047:
-------------------------------------

This is weird, I'm sure I fixed this a long time ago but the code that I remember writing is not there. I wonder if there was a merge issue along the way. Yes, sometimes you will get "9774d56d682e549c" for the uuid which is not unique.
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422567#comment-13422567 ] 

Simon MacDonald commented on CB-1047:
-------------------------------------

I think if we check to see if the ANDROID_ID is '9774d56d682e549c' then we know it is not unique as that was the screwed up ID. From there I think we should switch to using the IMEI of the device or some unique ID of our own making.
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1047) Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID

Posted by "Stephen J Fuhry (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413016#comment-13413016 ] 

Stephen J Fuhry commented on CB-1047:
-------------------------------------

Ha, I've been there. I was surprised to see that a similar solution was done for iOS some time ago and that it wasn't done for Android in the same breath.
                
> Android UUID can sometimes be undefined (or otherwise not unique) because of limitations in ANDROID_ID
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1047
>                 URL: https://issues.apache.org/jira/browse/CB-1047
>             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|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/Device.java#l173]):
> {code:java}
> android.provider.Settings.Secure.ANDROID_ID
> {code}
> Would it make sense to implement a solution like this?
> http://android-developers.blogspot.com/2011/03/identifying-app-installations.html
> see also: http://stackoverflow.com/a/2853253/111033
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira