ActivityDiary icon indicating copy to clipboard operation
ActivityDiary copied to clipboard

Switching activity using the notification buttons doesn't work

Open pandruszkow opened this issue 6 years ago • 6 comments

Steps to reproduce:

  1. Begin tracking an activity, for example "Activity 1"
  2. Pull down the Android notification bar
  3. Expand the Activity Diary notification "card" so that the buttons are visible
  4. Tap a button to switch to a different activity, for example "Activity 2"

Expected behaviour: Activity Diary switches from tracking time for "Activity 1" to tracking time for "Activity 2". The notification is updated to reflect this.

Actual behaviour: Nothing happens. "Activity 1" is still being tracked according to the main app and the notification.

pandruszkow avatar May 28 '19 17:05 pandruszkow

Thanks for the report. I just tried on my phone and it works properly but it is sometimes hard to hit the label. Let me raise some questions to track it down:

  • Does it open the app when you tap into the notification or on the next activities label?
  • which android version are you working on?

ramack avatar May 29 '19 15:05 ramack

Actually, it seems the behaviour is more complicated than that. Here's what I've noticed upon trying different things:

Tap on the notification:

  • opens app screen, doesn't switch activity

Tap on activity label/button in the notification:

  • sometimes nothing happens
  • sometimes opens app but doesn't switch current activity
  • sometimes opens app AND switches current activity

I'm running Android 9.

Hardware info: Nokia 6.1 (2018), model number TA-1050, firmware build 00WW_3_260_SP04.

pandruszkow avatar May 29 '19 16:05 pandruszkow

BTW, I'm happy to install any debug builds or send logcat logs if that helps you troubleshoot the issue

pandruszkow avatar May 29 '19 16:05 pandruszkow

Thanks for the offer. Normally this is a great help. In this case I don't loose the feeling, that the active area for tapping is just too small and we often touch beside the buttons. A classical bug in my code is quite unlikely, because I basically just set the color, the text and the action and the rest is done by the android framework. I'll try to increase the font size or sourround them with a frame or alike for the next release.

ramack avatar May 29 '19 19:05 ramack

I think that increasing the size of the buttons is a good idea, it will make it easier to hit them.

I can think of one other reason why this is happening. Maybe the application is being killed in the background by Android due to power saving features, and this is why it doesn't always switch activities.

My phone model is known for being too aggressive with power savings, so much that third party alarm apps would get killed before they could ring the alarm in the morning. Maybe it's that.

pandruszkow avatar May 29 '19 21:05 pandruszkow

I think I found the pattern: the app's main screen must be loaded in the background, then the switching feature works. If the app main screen is unloaded (by tapping the "switch app" button and then sliding the screen out of the list, or due to inactivity and loading another app that's more RAM-intensive), it does not. I hope that helps.

pandruszkow avatar Jun 03 '19 11:06 pandruszkow