Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5752] Android: Ti.Platform.id not unique

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-01-05T14:04:56.000+0000
Affected Version/sRelease 1.7.2, Release 1.8.0
Fix Version/sSprint 2011-41, Release 1.7.4, Release 1.8.0
ComponentsAndroid
Labelsmodule_platform, qe-testadded
ReporterKarol Pomaski
AssigneeAllen Yeung
Created2011-10-14T07:55:13.000+0000
Updated2012-01-05T14:04:56.000+0000

Description

Problem

Ti.Platform.id not unique. The devices that never have the unique value have the plaform ID's in the form of: 9627bb65-f0e2-4a3a-9cd5-dedb6ebee34a Devices that have the unique value have platform ID's that look like: ee8ed86d7db57ce

Reproducible Steps

1. Run the sample code on Simulator with APIs Android 2.2 2. Run the sample code one more time with the same Simulator - the Ti.Platform.id value would be different

Sample Code

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});

win1.open();

alert(Ti.Platform.id);

Associated HelpDesk Ticket

http://appc.me/c/APP-295184

Attachments

FileDateSize
platform1.png2011-10-14T07:55:13.000+0000146142
platform2.png2011-10-14T07:55:13.000+0000146138

Comments

  1. Don Thorp 2011-10-14

    if an application is uninstalled, its ID is destroyed with it. IDs are only generated if there is no platform id available from device, or if the known non-unique Id mentioned in the other ticket is returned from the device.
  2. Sergej Kotliar 2011-10-14

    Two things. First of all, it changes regardless of the application being uninstalled. I have logs that prove it, 10s between them. It's probably not possible for a user to uninstall and reinstall an app in 10s. Second, Urban Airship manages to remember the user correctly. So obviously, you could learn a thing or two from them and handle this as well. Closing this as "invalid" is absolutely unacceptable, this is a show-stopper bug!
  3. Sergej Kotliar 2011-10-14

    See the stuff I posted in the helpdesk https://support.appcelerator.com/tickets/APP-295184
  4. Don Thorp 2011-10-14

    The reproduction sequence never exhibited the problem on the 2.2 emulator by exiting and re-running the app. However it does appear if you reboot the emulator. The problem as stated in the ticket is vague and has information that doesn't apply to the problem. The invalid state was a signal back to the creator of the ticket that they needed to look into it and validate it before reopening it. An invalid ticket in JIRA does not in any way imply that your helpdesk problem is not valid. If we had resolved it Won't Fix then it might have deserved that response.
  5. Sergej Kotliar 2011-10-15

    I understand that you need to get the message across to educate your helpdesk staff on how you prefer to file bugs. But remember that behind the helpdesk staff is a customer of yours, that's paying serious money for your support and is currently stuck with a very serious bug. And in that situation, after spending a week in the "premium" service to get a bug across at all, seeing it "CLOSED" for whatever reason doesn't exactly calm the feeling of our application depending on a platform that has such a fundamental problem. I'm not here to argue. I just want to be able to make our app work somehow, our business kind of depends on it. Hoping for a speedy fix, and please make it stick this time. Please. Look at how UA made their generation code and try to make something similar, that sticks between restarts and preferably even between reinstalls on the same device. Thanks in advance.
  6. Natalie Huynh 2011-10-20

    Tested with 1.7.4.v20111019130614 with TiStudio 1.0.6.201110171921 Droid 2.2.2 and Motorola tab 3.2 - has unique ID Emulator 2.2 - keeps the same platform ID as long as it is not uninstalled, once the application is uninstalled and reinstalled a new platform ID will be displayed Emulator 2.3.3 - has unique ID Keeping open to confirm with 1.8 before closing
  7. Sergej Kotliar 2011-10-20

    The problem isn't that the ID is not unique (like the title misleadingly says), but rather that it changes every time the user opens the app. Has that been doublechecked? I don't have access to any devices that showed the problem so can not test.
  8. Zdenek Farana 2011-11-14

    Samsung Galaxy S, Android 2.3.3, Mobile SDK 1.8.0v20111108103105: The Ti.Platform.id is not consistent across app launches.
  9. Eric Merriman 2011-11-22

    Verified the following: With 1.8.0.1.v20111122105459 and v8 compile: Droid 1 (2.2.2): Platform id in form "62aa69827255df19" persists through launch and relaunch. Persists through uninstall/reinstall. Galaxy Tab (2.3.4): Platform id in form "22f0a4da0d208e68" persists through launch and relaunch. Persists through uninstall/reinstall. LG Experience (2.2.2): Platform id in form "f61ccf96-11d5-4565-aadf-dfd359e033f9" persists through launch and relaunch. DOES NOT persist through app uninstall/reinstall. verified rhino compile on 1.8.0.1 with Droid 1 matches observations with v8 compile. With 1.8.0.v20111108103105 and v8 compile: Droid 1 (2.2.2): Platform id in form "62aa69827255df19" persists through launch and relaunch. Persists through uninstall/reinstall. Galaxy Tab (2.3.4): Platform id in form "22f0a4da0d208e68" persists through launch and relaunch. Persists through uninstall/reinstall. LG Experience (2.2.2): Platform id in form "d6b6a4c0-a730-4c90-8642-1f2f6a9a8e0c" persists through launch and relaunch. DOES NOT persist through app uninstall/reinstall. Additional note: On one test on the LG device, I did not clear app data and uninstall. Then I installed the app built with a new SDK and the previous id appeared. Only after clearing data and uninstalling did a new ID appear.
  10. Michael Pettiford 2011-12-09

    Tested on Ti Studio 1.0.7.201112080131

 Ti Mob SDK 1.8.0.1.v20111209102124 v8/rhino

 OSX Lion 
Nexus S OS 2.3.6 Expected behavior of platform.id persisting through relaunch/uninstall is shown
  11. Natalie Huynh 2012-01-05

    Reopen to add label

JSON Source