[AC-3424] In trayClickFocusedApp eventListener only alert() is getting executed. Other Functions, fireEvents, etc. are not getting called inside eventListener.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2016-04-05T20:53:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | android, cloudpush, trayClickFocusedApp |
Reporter | Suraj Datta |
Assignee | Shak Hossain |
Created | 2016-03-29T15:26:17.000+0000 |
Updated | 2016-04-05T20:53:32.000+0000 |
Description
Code:
CloudPush.addEventListener('trayClickFocusedApp', function(evt) {
alert("In trayClickFocusedApp event");
//Ti.App.fireEvent('TimelineRefresh');
// Ti.App.fireEvent('messageRefresh', {
//
// });
// Ti.App.fireEvent('listViewPhotoRefresh', {
//
// });
// Ti.App.fireEvent('listViewRefresh', {
//
// });
});
In above code only alert() gets executed & if i uncomment those fireEvents, trayClickFocusedApp Event doesn't get called.
Version Used:
CloudPush : 3.4.1
Titanium SDK : 5.2.0
Attachments
File | Date | Size |
---|---|---|
0-neu-d5-2f9fb89c7a021928872d1f453ee9ac86.jpg | 2016-03-29T20:28:06.000+0000 | 39795 |
0-neu-d5-729d0f7ecf240d71248b99b7fd452d1f.jpg | 2016-03-29T20:27:26.000+0000 | 37028 |
Hello, I have tried to reproduce the issue with SDK 5.2.1.GA. I can’t reproduce this issue. I have tested with Android 5.0.2. Below is the code that I am using.
Both alert (trayClickFocusedApp and myFunction) was fired successfully. See the attachments. Also, in the console I got the response.
I would suggest, defining your functions somewhere in the code and call the functions (as I did) inside the "trayClickFocusedApp" event listener. Also, Please share with us the full code that you are using. Regards, Sharif
Hello Sharif, Thanks for your response. I noticed following behaviour wrt above Event. *Run1:* * Launched my app * Put it in background * Generated notifications * On click of notification, app gets focused but the fireEvents didn't get executed. * Exited my app. *Run2:* * Launched my app again * Put it in background * Generated notifications * Now on click of notification, the fireEvents & other codes gets executed on 2nd run. Thanks & Regards, Suraj Datta.
Hello Sharif, Can you please test the above behaviours? Regards, Suraj Datta.
Hello [~Suraj Datta], I have tested again following the steps you have mentioned above. I wasn't able to reproduce your issue. Here is how I have tested it. 1.Build with SDK 5.2.1.GA. 2.Launched my app. 3.Put the app in background. 4.Generated notifications. 5.On click of notification, app gets focused myFunction(); get executed. 6.Console shows trayClickFocusedApp fired. Regards, Sharif