Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on the trip end notification frequently does not go to the diary page #575

Closed
shankari opened this issue Sep 2, 2020 · 10 comments

Comments

@shankari
Copy link
Contributor

shankari commented Sep 2, 2020

This seems to happen consistently on the test android 6.0 and happened at least once on J's 8.1.1
Simple workaround is to just go to the diary screen by default, but let's see if we can fix this first.

@shankari
Copy link
Contributor Author

shankari commented Sep 2, 2020

Here's what I see from J's logs:

In general, when we get android.intent.action.MAIN, we get a corresponding CLICK event detected. But not the last time?!

134,1596916860.051,2020-08-08T13:01:00.051000-07:00,JWTAuthPlugin : onNewIntent(emission://auth?...)
136,1596916860.089,2020-08-08T13:01:00.089000-07:00,DataCollectionPlugin : onNewIntent(android.intent.action.VIEW)

3689,1597161139.915,2020-08-11T08:52:19.915000-07:00,JWTAuthPlugin : onNewIntent(null)
3691,1597161139.92,2020-08-11T08:52:19.920000-07:00,DataCollectionPlugin : onNewIntent(android.intent.action.MAIN)
5497,1597339505.276,2020-08-13T10:25:05.276000-07:00,"js : Notification, click event"

6824,1597377186.496,2020-08-13T20:53:06.496000-07:00,JWTAuthPlugin : onNewIntent(null)
6827,1597377186.504,2020-08-13T20:53:06.504000-07:00,DataCollectionPlugin : onNewIntent(null)

14913,1597442263.599,2020-08-14T14:57:43.599000-07:00,JWTAuthPlugin : onNewIntent(null)
14916,1597442263.617,2020-08-14T14:57:43.617000-07:00,DataCollectionPlugin : onNewIntent(null)

24930,1598572956.25,2020-08-27T17:02:36.250000-07:00,JWTAuthPlugin : onNewIntent(null)
24932,1598572956.2529998,2020-08-27T17:02:36.253000-07:00,DataCollectionPlugin : onNewIntent(DISPLAY_RESOLUTION)
26109,1598576026.3960001,2020-08-27T17:53:46.396000-07:00,"js : Notification, click event"

26111,1598576026.414,2020-08-27T17:53:46.414000-07:00,JWTAuthPlugin : onNewIntent(null)
26113,1598576026.417,2020-08-27T17:53:46.417000-07:00,DataCollectionPlugin : onNewIntent(android.intent.action.MAIN)
26395,1598576113.658,2020-08-27T17:55:13.658000-07:00,"js : Notification, click event"

26397,1598576113.675,2020-08-27T17:55:13.675000-07:00,JWTAuthPlugin : onNewIntent(null)
26400,1598576113.679,2020-08-27T17:55:13.679000-07:00,DataCollectionPlugin : onNewIntent(android.intent.action.MAIN)

@shankari
Copy link
Contributor Author

shankari commented Sep 2, 2020

Similarly on the test phone except that it never detects the click notification. I am going to just make the diary be the default screen for now so that I can focus on the iOS tracking errors for now.

140,1598573311.1660001,2020-08-27T17:08:31.166000-07:00,JWTAuthPlugin : onNewIntent(emission://auth?....)
142,1598573311.196,2020-08-27T17:08:31.196000-07:00,DataCollectionPlugin : onNewIntent(android.intent.action.VIEW)

234,1598573620.049,2020-08-27T17:13:40.049000-07:00,JWTAuthPlugin : onNewIntent(null)
237,1598573620.089,2020-08-27T17:13:40.089000-07:00,DataCollectionPlugin : onNewIntent(android.intent.action.MAIN)

3774,1598632911.47,2020-08-28T09:41:51.470000-07:00,JWTAuthPlugin : onNewIntent(null)
3776,1598632911.4870002,2020-08-28T09:41:51.487000-07:00,DataCollectionPlugin : onNewIntent(android.intent.action.MAIN)

4735,1598648202.514,2020-08-28T13:56:42.514000-07:00,JWTAuthPlugin : onNewIntent(null)
4738,1598648202.5479999,2020-08-28T13:56:42.548000-07:00,DataCollectionPlugin : onNewIntent(android.intent.action.MAIN)

5280,1598672100.7289999,2020-08-28T20:35:00.729000-07:00,JWTAuthPlugin : onNewIntent(null)
5283,1598672100.7529998,2020-08-28T20:35:00.753000-07:00,DataCollectionPlugin : onNewIntent(null)

5286,1598672106.6929998,2020-08-28T20:35:06.693000-07:00,JWTAuthPlugin : onNewIntent(null)
5289,1598672106.772,2020-08-28T20:35:06.772000-07:00,DataCollectionPlugin : onNewIntent(null)

7490,1598740544.285,2020-08-29T15:35:44.285000-07:00,JWTAuthPlugin : onNewIntent(null)
7493,1598740544.3170002,2020-08-29T15:35:44.317000-07:00,DataCollectionPlugin : onNewIntent(DISPLAY_RESOLUTION)

@shankari
Copy link
Contributor Author

shankari commented Sep 2, 2020

This is probably because of
https://developer.android.com/guide/components/activities/background-starts

Note: For the purposes of starting activities, an app running a foreground service is still considered to be "in the background".

But this seems to be only for apps running on 10, which is clearly not the case here. Added additional logging to the ClickReceiver in the local notification code to see if we can get greater clarity. In the meanwhile, moving to the diary as the default.

@PatGendre
Copy link
Contributor

Hi @shankari we have a similar problem with the Master branch.
Not always but often when clicking on the notification, this goes to the Profile screen and displays a blank screen. And not only on Android, this happens also on iOS (tested today by Yann). We will test again the app if useful.
Screenshot_20210121-142001_TraceMob

@shankari
Copy link
Contributor Author

@PatGendre making the diary the default is in
e-mission/e-mission-phone@9978e50

I am going to merge some of the other changes from that PR into master as well, as optional modules. Was going to do this as the default on master at the time.

If I don't get that done this weekend (by Monday morning PST = Monday night CET), feel free to remind me.

I can also cherry-pick it right now but am worried about bigger merge conflicts when I deal with the other changes.

@PatGendre
Copy link
Contributor

Hi @shankari I am not sure you merged e-mission/e-mission-phone@9978e50 yet into master?
Not urgent for us but as you suggested me to remind you, I do it ;-) Thanks

@PatGendre
Copy link
Contributor

Hi again @shankari I am not sure you merged e-mission/e-mission-phone@9978e50 yet into master?

If you did not, Yann will have to look by himself how to solve the blank screen issue on notification.
Thanks!

@shankari
Copy link
Contributor Author

@PatGendre sorry, I started the merge of e-mission/e-mission-phone#737 to master, but got stuck while figuring out the auth merges (e-mission/e-mission-phone@ce41917, e-mission/e-mission-phone@985745e), which will require a separate, more complicated configuration.

Maybe tonight I can merge only this change, and deal with the auth code separately.

@PatGendre
Copy link
Contributor

@shankari thanks, no problem at all ! You can 2 or 3 days if you have other urgent things to do. Thanks in advance

@shankari
Copy link
Contributor Author

Merged into master since there were no complaints on either NRELlh or CanBikeCO after the change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants