[TIMOB-26516] Android: Ti.Platform "id" and "version" properties return null if analytics disabled as of 7.5.0.RC
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-11-07T00:57:04.000+0000 |
Affected Version/s | Release 7.5.0 |
Fix Version/s | Release 7.5.0 |
Components | Android |
Labels | analytics, android, aps, id, regression, version |
Reporter | Joe Falcone |
Assignee | Gary Mathews |
Created | 2018-11-03T10:42:59.000+0000 |
Updated | 2018-11-07T23:16:41.000+0000 |
Description
*Summary:*
Properties In the log, notice that "id" and "version" return
*tiapp.xml*
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.
Hello, Please provide a full test code that demonstrates the issue. Also, provide steps to reproduce the issue. Thanks.
Take any app. In tiapp.xml, set
Hello, I was able to reproduce the issue. Forwarding this to the engineering. Thanks.
Fix version 7.5.0 right?
Would be nice to get this fix into 7.5.0. I have a bunch of apps to re-release with Pie support.
master: https://github.com/appcelerator/titanium_mobile/pull/10423
7_5_X: https://github.com/appcelerator/titanium_mobile/pull/10424
Merged to 7_5_X and master branches.
I still see Platform.id as
null
with 7.5.0 & master.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
FR Passed.
PR Merged.
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...
Verified the fix in SDK 7.5.0.v20181107142952. Closing.