Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13952] Android: analytics timedEvent does not fire

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-02-19T19:21:48.000+0000
Affected Version/sRelease 3.1.1
Fix Version/sBacklog
ComponentsAndroid
Labelsqe-3.1.1
ReporterParas Mishra
AssigneeIngo Muschenetz
Created2013-05-22T10:28:20.000+0000
Updated2017-03-27T20:41:37.000+0000

Description

Android: analytics timedEvent does not fire. This is not a regression. Issue occurs since 2.1.4.GA Steps to reproduce: 1. Run the app.
Titanium.UI.setBackgroundColor('#fff');

// create tab group
var win = Ti.UI.createWindow({
layout: 'vertical'
});

var startDate = new Date();

//Testing the Ti.Analytics.featureEvent
var testOneButton = Ti.UI.createButton({
title: "featureEvent",
height: 50,
width: 250,
top: 20
});
testOneButton.addEventListener('click', function(e){
Ti.Analytics.featureEvent('featureEvent.testButton');
});

//Testing the Ti.Analytics.navEvent
var testTwoButton = Ti.UI.createButton({
title: "navEvent",
height: 50,
width: 250,
top: 20
});
testTwoButton.addEventListener('click', function(e){
Ti.Analytics.navEvent('here', 'there', 'navEvent.testButton');
});

//Testing the Ti.Analytics.settingsEvent
var testThreeButton = Ti.UI.createButton({
title: "settingsEvent",
height: 50,
width: 250,
top: 20
});
testThreeButton.addEventListener('click', function(e){
Ti.Analytics.settingsEvent('settingsEvent.testButton');
});


//Testing the Ti.Analytics.timedEvent
var testFourButton = Ti.UI.createButton({
title: "timedEvent",
height: 50,
width: 250,
top: 20
});
testFourButton.addEventListener('click', function(e){
	var stopDate = new Date();
	var duration = stopDate - startDate;
	Ti.Analytics.timedEvent('timedEvent.testButton',startDate, stopDate, duration);
});


//Testing the Ti.Analytics.userEvent
var testFiveButton = Ti.UI.createButton({
title: "userEvent",
height: 50,
width: 250,
top: 20
});
testFiveButton.addEventListener('click', function(e){
Ti.Analytics.userEvent('userEvent.testButton');
});

win.add(testOneButton);
win.add(testTwoButton);
win.add(testThreeButton);
win.add(testFourButton);
win.add(testFiveButton);
win.open();

2. Press the timedEvent button 3. Check logs 4. Quit application check logs Expected: After Step 3: nothing is logged After Step4: "event":"timedEvent.testButton","data":{"start":"","data":[],"event":"timedEvent.testButton","stop":"","duration":""}," Actual : no logs appear.

Comments

  1. Paras Mishra 2013-05-22

    Android: analytics userEvent also doesnot fired up. This is not a regression. Issue occurs since 2.1.4.GA Tested on: Device : Google Nexus 7, Android Version: 4.1 SDK: 3.1.1.v20130521153706 CLI version : 3.1.0 OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.2.201305212422 XCode : 4.5.1
  2. Allen Yeung 2014-02-19

    Marking as cannot reproduce. Tried this on 3.2.1.GA Galaxy Nexus 4.X. I was able to get both the userEvent, and timedEvent.
  3. Lee Morris 2017-03-27

    Closing ticket as I am unable to reproduce this issue with the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source