Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23395] Analytics: Improve structure of JSON data element for ti.background - Android Ti SDK and APS SDK

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-06-01T19:12:22.000+0000
Affected Version/sRelease 5.3.0
Fix Version/sRelease 5.4.0
ComponentsAndroid
Labelsqe-5.3.0
ReporterEric Merriman
AssigneeAshraf Abu
Created2016-05-17T17:28:39.000+0000
Updated2016-07-12T01:05:17.000+0000

Description

Description:

The JSON payload for ti.background includes a data element that should be improved. Currently it appears as:
{
	"ver": "3",
	"id": "7cea9910-cf8b-4a3c-a8f8-c8ed14276cc5:dc5e5c1715b599dd",
	"event": "ti.background",
	"ts": "2014-12-09T18:14:51.282+0000",
	"mid": "dc5e5c1715b599dd",
	"sid": "79dd4123-1685-43fa-82d0-6816ddcd9901",
	"aguid": "5ae84ca8-78ad-4776-9640-b7b3dd29543b",
	"data": {
		"value": ""
	},
	"seq": 3
}
But it should appear (if empty) as:
{
	"ver": "3",
	"id": "7cea9910-cf8b-4a3c-a8f8-c8ed14276cc5:dc5e5c1715b599dd",
	"event": "ti.background",
	"ts": "2014-12-09T18:14:51.282+0000",
	"mid": "dc5e5c1715b599dd",
	"sid": "79dd4123-1685-43fa-82d0-6816ddcd9901",
	"aguid": "5ae84ca8-78ad-4776-9640-b7b3dd29543b",
	"data": { },
	"seq": 3
}

Steps to reproduce:

1) Install a titanium project on a android device 2) Launch the app 3) Use either - a) point device to staging via DNS setting, check logs. b) Use get last event api c) If you have backend access, check the raw event on AWS. 4) Examine any of the ti.background events

Result:

"data" element is structured poorly

Expected Result:

"data" element, when empty, structured as suggested.

Comments

  1. Lokesh Choudhary 2016-07-12

    Verified the fix. With the fix data looks like this: "data": {} Closing. Environment: Appc Studio : 4.7.0.201607111053 Ti SDK : 5.4.0.v20160705213725 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.5 Appc NPM : 4.2.8-1 Appc CLI : 5.4.0-29 Node: 4.4.4 Nexus 6 - Android 6.0.1

JSON Source