Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26516] Android: Ti.Platform "id" and "version" properties return null if analytics disabled as of 7.5.0.RC

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-11-07T00:57:04.000+0000
Affected Version/sRelease 7.5.0
Fix Version/sRelease 7.5.0
ComponentsAndroid
Labelsanalytics, android, aps, id, regression, version
ReporterJoe Falcone
AssigneeGary Mathews
Created2018-11-03T10:42:59.000+0000
Updated2018-11-07T23:16:41.000+0000

Description

*Summary:* Properties Ti.Platform.id and Ti.Platform.version return null if analytics have been disabled in the "tiapp.xml" file. They return the correct values if analytics is enabled. This bug was introduced as of 7.5.0.RC. *Steps to reproduce:*

Set up a Classic app with the "app.js" code shown below.

In the "tiapp.xml" file, disabled analytics as shown below.

Build and run on an Android device.

In the log, notice that "id" and "version" return null. _(This is the bug.)_

*tiapp.xml*
<ti:app xmlns:ti="http://ti.appcelerator.org">
    <analytics>false</analytics>
</ti:app>
*app.js*
Ti.API.info("@@@ Ti.Platform.id: " + Ti.Platform.id);
Ti.API.info("@@@ Ti.Platform.version: " + Ti.Platform.version);
*Note:* I suspect APIs Ti.Geolocation.forwardGeocoder() and Ti.Geolocation.reverseGeocoder() might also fail if analytics is disabled.

Comments

  1. Sharif AbuDarda 2018-11-03

    Hello, Please provide a full test code that demonstrates the issue. Also, provide steps to reproduce the issue. Thanks.
  2. Joe Falcone 2018-11-03

    Take any app. In tiapp.xml, set false Insert Ti.API.info(Ti.Platform.version); // or Ti.Platform.id, etc as the first line in app.js Build for Android with SDK 7.5.0 RC Ti.Platform.version will be "null"
  3. Sharif AbuDarda 2018-11-04

    Hello, I was able to reproduce the issue. Forwarding this to the engineering. Thanks.
  4. Muhammad Ahmed Fahad 2018-11-05

    Fix version 7.5.0 right?
  5. Joe Falcone 2018-11-05

    Would be nice to get this fix into 7.5.0. I have a bunch of apps to re-release with Pie support.
  6. Gary Mathews 2018-11-06

    master: https://github.com/appcelerator/titanium_mobile/pull/10423
  7. Gary Mathews 2018-11-06

    7_5_X: https://github.com/appcelerator/titanium_mobile/pull/10424
  8. Christopher Williams 2018-11-06

    Merged to 7_5_X and master branches.
  9. Lokesh Choudhary 2018-11-06

    I still see Platform.id as null with 7.5.0 & master.
    @@@ Ti.Platform.id: null
  10. Gary Mathews 2018-11-06

    aps_sdk: https://github.com/appcelerator/aps_sdk/pull/326 master: https://github.com/appcelerator/titanium_mobile/pull/10429 7_5_X: https://github.com/appcelerator/titanium_mobile/pull/10430
  11. Lokesh Choudhary 2018-11-06

    FR Passed.
  12. Lokesh Choudhary 2018-11-07

    PR Merged.
  13. martin 2018-11-07

    Testing with 7.5.0.v20181106170019 and now correctly gets an Id from Ti.Platform.id, but from Ti.Platform.version I get the version of the app (Ti.App.version) instead of the version of the OS...
  14. Joe Falcone 2018-11-07

  15. Lokesh Choudhary 2018-11-07

  16. Lokesh Choudhary 2018-11-07

    Verified the fix in SDK 7.5.0.v20181107142952. Closing.

JSON Source