Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16360] Android: trayClickFocusedApp event not fired when push notification clicked in tray

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-10-20T17:59:22.000+0000
Affected Version/sRelease 3.2.0
Fix Version/sRelease 3.2.1, Release 3.3.0
ComponentsAndroid
Labelsandroid, module_acs, qe-manualtest, trayClickFocusedApp
ReporterMahlon Gumbs
AssigneeJon Alter
Created2013-12-26T15:53:32.000+0000
Updated2017-03-31T22:23:37.000+0000

Description

Comments

  1. Paulo Alves 2014-01-21

    I have the same problem, if you use 3.1.3 is possible work with trayClickFocusedApp event?
  2. Seth Toda 2014-02-01

    Was able to reproduce this on Android 4.3, CLI 3.2, SDK 3.2. Moved to engineering
  3. Ingo Muschenetz 2014-02-03

    Placing in consideration for 3.2.1.
  4. Jon Alter 2014-02-04

    PR: https://github.com/appcelerator-modules/cloudpush/pull/6
  5. Ingo Muschenetz 2014-02-05

    PR to merge module: https://github.com/appcelerator/titanium_mobile/commit/2604bb2bb9600aa67dec291a7bb02a90684a3170
  6. Lokesh Choudhary 2014-02-06

    Verified the fix. Taping on the notification brings the app to the foreground & we get alert "got the trayClickFocussedApp event". Closing. Environment: Appc Studio : 3.2.1.201401311225 Ti SDK : 3.2.1.v20140205094854 Mac OSX : 10.8.5 Alloy : 1.3.1-cr CLI - 3.2.1 beta3 Nexus 4 - android 4.4.2
  7. Alex Bernier 2014-02-14

    Should I expect to have payload in the event? I don't. However, "callback" gives me the payload and is now only fired when tapping notification in the tray. In past SDKs, "callback" was fired when the push notification was delivered to the phone, before tapping.
       	CloudPush.addEventListener("callback", function(e) {
       		Ti.API.info("callback, with payload: " + JSON.stringify(e));
       	});
       
       	CloudPush.addEventListener("trayClickFocusedApp", function(e) {
       		Ti.API.info("trayClickFocusedApp, no payload: " + JSON.stringify(e));
       	});
       
    Environment: Studio : 3.2.1.GA Ti SDK : 3.2.1.GA Ti CLI : 3.2.1.GA Alloy : 1.3.1 Device : Nexus 5, Android 4.4.2 So I'm using the "callback" event now, and not "trayClickFocusedApp".
  8. Alex Bernier 2014-02-21

    I was wrong above. "callback" is fired when the push is received, not when the user taps. Other circumstances led me to believe it was happening on tap.
  9. Silambarasan Raman 2014-10-16

    Hi There, I am using ti.cloudpush 3.3.0, And i am getting Push and Callback is fine, But not getting the below, CloudPush.addEventListener('trayClickLaunchedApp', function (evt) { alert('Tray Click Launched App (app was not running)'); }); CloudPush.addEventListener('trayClickFocusedApp', function (evt) { alert('Tray Click Focused App (app was already running)'); }); Can you help me to solved out this issue
  10. Jon Alter 2014-10-16

    [~simbu] Here is the current ticket for this issue TIMOB-17815 It will be fixed in the next version of ti.cloudpush.
  11. Alex Bernier 2014-10-16

    Jira is saying I don't have permission to view TIMOB-17815.
  12. Jon Alter 2014-10-16

    Try now.
  13. Alex Bernier 2014-10-16

    Works now. Thank you!
  14. Silambarasan Raman 2014-10-17

  15. Jon Alter 2014-10-17

    [~simbu] You will either have to use ti.cloudpush 3.2.1 or wait for 3.3.1.
  16. Silambarasan Raman 2014-10-19

    Jon Alter, I have tried with 3.2.1 module, But its not firing the Tray Events.
  17. Jon Alter 2014-10-20

    ti.cloudpush 3.3.1 can be downloaded here: https://github.com/appcelerator/titanium_mobile/raw/master/support/module/packaged/ti.cloudpush-android-3.3.1.zip
  18. Silambarasan Raman 2014-10-21

    Hi Jon Alter, Really, Thanks for this updated ti.cloudpush 3.3.1. Its working fine, But is there any way to get the payload on that TrayEvents like we are getting in callback. Can you please let me know is there any option for the firing the same event of TrayClickLaunchedApp, and TryClickFocusedApp for iOS. ?
  19. Silambarasan Raman 2014-10-23

    Hi Jon, Please have a look at my above comment, We need your help here, Since we are in the App Publishing stage.
  20. Jon Alter 2014-10-23

  21. Silambarasan Raman 2014-10-24

    Hi Jon, Thanks, We will manage the Android Payload issue and will create ticket if its more important. But for iOS can you help us with the existing Ti versions. We have used the Interactive notification already but its only for iOS 8, So it won't help us.
  22. Jon Alter 2014-10-27

    [~simbu] - We don't currently have an event that fires on iOS to let you know that the app was foregrounded by a user clicking on a notification. If this is important to you, please create another ticket requesting this feature and add a link to it here.
  23. Silambarasan Raman 2014-11-07

    Hi Jon, Thanks, I have used the silent push notification for iOS for time being. http://docs.appcelerator.com/titanium/3.0/#!/guide/iOS_Background_Services I will create a ticket later if its important to me
  24. Silambarasan Raman 2014-11-19

  25. Jon Alter 2014-11-20

    Thanks for creating the ticket [~simbu].
  26. Patrick van Vuuren 2015-01-30

    Jon Alter, is it possible you could push CloudPush 3.3.8 zip to https://github.com/appcelerator/titanium_mobile/raw/master/support/module/packaged/? When accessing the actual issue [MOD-1905], it is not possible for me to comment on that ticket. And your link https://github.com/appcelerator-modules/cloudpush/releases/tag/3.3.8 does not work for me to use it. It directs me to a 404 page.
  27. Jon Alter 2015-02-02

    [~Serfenia], it is done.
  28. Brad Ball 2015-11-25

    I am still seeing this issue. When my app is backgrounded and I tap on a notification, the app gets foregrounded, but the trayClickFocusedApp event is never fired (neither is the callback event). I have tried both with singleCallback=true AND singleCallback=false and behaviour is the same. All other scenarios seem to work fine (trayClickLaunchedApp gets fired if the app is not running at all) and callback gets fired if the app is already foregrounded or if it's not running at all. But when the app is running but backgrounded, the trayClickFocusedApp and callback events are NOT fired. Environment: Appc Studio : 4.4.0.201511182122 Ti SDK : 5.1.0.GA Mac OSX : 10.10.5 Ti.Cloudpush: 3.4.0 Galaxy S4 - android 5.0.1
  29. Alex Bernier 2015-11-26

    [~bradleycorn] I don't think the Appcelerator team is updated on closed tickets. You may want to open a new one if they don't acknowledge your comment.
  30. Lee Morris 2017-03-31

    Closing ticket as fixed, if there are any problems, please file a new ticket.

JSON Source