ramack / ActivityDiary

Android diary for any kind of activities
GNU General Public License v3.0
73 stars 37 forks source link

Switching activity using the notification buttons doesn't work #267

Open pandruszkow opened 5 years ago

pandruszkow commented 5 years ago

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.

ramack commented 5 years ago

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:

pandruszkow commented 5 years ago

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

Tap on the notification:

Tap on activity label/button in the notification:

I'm running Android 9.

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

pandruszkow commented 5 years ago

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

ramack commented 5 years ago

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.

pandruszkow commented 5 years ago

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 commented 5 years ago

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.