chrono icon indicating copy to clipboard operation
chrono copied to clipboard

Add option to open specific page when opening from widgets

Open th23x opened this issue 1 year ago • 10 comments

Describe the bug Great to have to option for a default page eg "Alarms" to be opened when launching Chrono - thanks for adding 👍

The function works as expexted when the app is previously closed - not open anymore in the recent apps overview. But it doesn't bring/show the set default page when the app was still open "in the background".

To Reproduce Steps to reproduce the behavior:

  1. Set "alarms" as default page
  2. Navigate to "timers" page
  3. Move to Android start screen - ie Chrono gets hidden but runs in the background
  4. Click the app icon or (new) widget
  5. Chrono comes the the foreground but shows the "timers" page, not the default "alarms"

Expected behavior Show default page once regaining focus

Screenshots n/a

Smartphone Information

  • Device: Samsung S10e
  • OS: Android 12
  • App version 0.50-beta

Additional context Add any other context about the problem here.

th23x avatar May 14 '24 15:05 th23x

I don't think that would be desirable behavior. If you are doing something on one page, go to another app, and come back, you should continue where you left off rather than being suddenly taken back to default page.

But I can add another setting like 'Open default tab on focus' or something like that if someone does want this functionality.

AhsanSarwar45 avatar May 14 '24 16:05 AhsanSarwar45

Now that you mention I am not sure anymore...

Loosing / getting focus is potentially too much for forcing the default page again.

I stubled upon the idea when clicking on the new widget and expecting to get to the default.

th23x avatar May 14 '24 16:05 th23x

Maybe a setting to open a specific page when launched from the widget. In the future when we might have stopwatch or timer widgets, they would ofcourse open the relevant pages when clicked. Maybe it might be desirable to control which page to open when clicking on clock widget too.

AhsanSarwar45 avatar May 14 '24 18:05 AhsanSarwar45

Yes, indeed... In case there are more widgets coming, potentially a setting in each widget "action on click" would be great with the options:

  • open app (as is)
  • open default page (as per general default setting)
  • open specific page (alarms, timers,...)

Sounds like a good idea - and target user expectation as good as possible.

th23x avatar May 14 '24 19:05 th23x

I had a kinda similar request (or maybe it's a bug?) that widget tap should always open the last visible tab. So I was somewhat confused by this issue because in my case:

  1. tap on widget - it opens alarms
  2. go to timers
  3. hit back to exit the app

Taping on widget always open "Alarms" page.

Now, if I use "home" button instead of "back" then the widget always open last page.

For me keeping the focus and always opening last visible page is the desired behaviour

woj-tek avatar May 19 '24 10:05 woj-tek

Interesting...usually not using the back button.

But of course, if it ends the app, afterwards returns to the default tab. While home button keeps the focus.

Maybe with many people and different desires for behavior best is an option per widget. And add "last open" option to the default page settings.

th23x avatar May 19 '24 11:05 th23x

But of course, if it ends the app, afterwards returns to the default tab. While home button keeps the focus.

But app may be ended even when using home-button (OS kill)?

Maybe with many people and different desires for behavior best is an option per widget. And add "last open" option to the default page settings.

I think that would be ideal but possibly complicates the logic...

woj-tek avatar May 19 '24 19:05 woj-tek

But app may be ended even when using home-button (OS kill)?

If you press the back button to close app, thats kills the app. I think its the standard way in android. So when you open it again, it starts the app and should send you to the default page.

If you press the home button, that is supposed to minimize the app (send it to background). So when you open it again, it should send you where you left off.

Ofcourse if the app is minimized for a long duration, the system kills it to save battery and resources. Opening it again will take you to the default page.

All this is handled by the system and I don't think there is much to be controlled there. What we can control is the following 3 behaviors:

  • What happens when app is cold started (current behavior is to open default page. We can add an option to remember the last page and reopen that)
  • What happens when app is maximized from background (current behavior is to continue where you left off, and I think it should stay that way)
  • What happens after app opens by clicking on widget or notification (this should open the relevant user defined page), irrespective of whether the app was minimized or killed.

AhsanSarwar45 avatar May 21 '24 12:05 AhsanSarwar45

  • What happens when app is cold started (current behavior is to open default page. We can add an option to remember the last page and reopen that)

+1 on this one for me - it could be applied to all use cases (i.e. remember last page).

  • What happens when app is maximized from background (current behavior is to continue where you left off, and I think it should stay that way)

Minimised?

Indeed, making sure that the page is remembered would be a good idea (handling of OS killing the app, but again (1) with remembering last page should handle this one as well?)

  • What happens after app opens by clicking on widget or notification (this should open the relevant user defined page), irrespective of whether the app was minimized or killed.

This could be somewhat usefull but I'm not sure it's all that essential.

When to think about it currently the problem is the lack of consistency - sometimes the app main page, other times (either different button or long time no use) different page.

woj-tek avatar May 21 '24 14:05 woj-tek

Would agree with @AhsanSarwar45 on the default Android handled cases.

For the 3 cases user definable:

What happens when app is cold started (current behavior is to open default page. We can add an option to remember the last page and reopen that)

Adding an option "rember last page used" sounds really good 👍

What happens when app is maximized from background (current behavior is to continue where you left off, and I think it should stay that way)

Agree, other than my original idea - because flipping between apps to eg ensure right timing for an alarm might by tricky

What happens after app opens by clicking on widget or notification (this should open the relevant user defined page), irrespective of whether the app was minimized or killed.

Would be great to allow some choices per widget, but personally with having the option "last tab open" in general, for me fine - as this in 95% cases for me would be what I expect, as I use most the alarms.

th23x avatar May 21 '24 15:05 th23x